Viewing Websites

Discussion in 'Web Design and Development' started by Gooden, Jun 7, 2009.

  1. Gooden macrumors member

    Joined:
    Jun 7, 2009
    #1
    Hello,

    I am very new to macs and need some help with viewing my websites that I have designed and coded locally. For instance on a PC you could just make a file called whatever then inside have your index.html / style.css etc and be able to view them straight up, but I can't seem to do that on the mac. I'm sure you must be able to or is there a different way of doing so on a mac?

    All help is appreciated

    Thanks
    Steve
     
  2. i.shaun macrumors 6502a

    i.shaun

    Joined:
    May 1, 2008
    Location:
    Canada
    #2
    I'm not quite sure what you're referring to. . Is the HTML file not opening in Safari (or whatever browser you're using)?



    edit: Placing an HTML file and related images/resources in the same directory should work the same as in Windows
     
  3. Gooden thread starter macrumors member

    Joined:
    Jun 7, 2009
    #3
    Hello,

    It doesn't seem to work for me. I have say a folder in documents called Website then all my resources in there, go to open the index.html and nothing loads! Unlike in windows it would.

    Does that help :p

    Thanks
    Steve
     
  4. redwarrior macrumors 603

    redwarrior

    Joined:
    Apr 7, 2008
    Location:
    in the Dawg house
    #4
    You probably need to right click and tell it what to open with. There may be several choices, but I don't know why it's not defaulting to something.:confused:
     
  5. i.shaun macrumors 6502a

    i.shaun

    Joined:
    May 1, 2008
    Location:
    Canada
    #5
    Hmm, how are you linking to pictures and stuff in the index HTML file? I thought it was the same across platforms.


    What I do is have the Index file in a folder, say:

    Websites/

    In the HTML, any link to an image in that same directory is simply "image.jpg" If my image or other resource is in a sub folder:

    Websites/Images

    I will Link accordingly "Images/image.jpg"


    Does that help?
     
  6. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #6
    You need to specify the full path to your images and CSS template. If your stuff is in Documents/Website/ you would use

    Code:
    <img src="/Documents/Website/image.jpg" alt="My image" />
    Also, this should probably be moved to the Web Dev forum.
     
  7. michael.lauden macrumors 68020

    michael.lauden

    Joined:
    Dec 25, 2008
    #7
    sounds like you need to invest in an Intro to HTML book, O'Reilly makes a great one that includes CSS and XHTML that i am currently going through!
     
  8. Coomkeen macrumors newbie

    Joined:
    Apr 21, 2008
    #8
    Surely, regardless of whether it's valid HTML or not, if it's got the .html file ending it should open Safari or Firefox or whatever, even if it gets an error message.

    Try saving any old rubbish as an rtf file from TextEdit, then changing the ending to html, and double-clicking it.
    It should open in the default browser and show whatever junk you put in the file.
     
  9. Yvan256 macrumors 601

    Joined:
    Jul 5, 2004
    Location:
    Canada
    #9
    I'm sorry but doing a full path on the ressources is not the way to go. If he then uploads to a web server he'll have to edit all those paths to be either relative or absolute.

    I'd suggest using relative paths, that way it will work both locally and once uploaded to a web server.

    Anyway, he should be using Mac OS X's built-in "Personal Web Sharing", which is Apache already installed on your computer.
     

Share This Page