SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face I can't get web pagesto link

    Hello, I am reading Ian LLoyds book BYOSTRW with HTML and CSS (2nd ed). I am having a problem with the subject on page 63, regarding linking. I have typed the code, checked and re-checked but the pages still won't link. I get an error message that says Internet Explorer cannot display the webpage, then when I hit the key to diagnose the problem it says- Make sure the web address you typed is spelled correctly, windows can't find "file:///C:/users/website%20design/index.html". I am sure I am outhinking myself but where in the code does it say "look for the linked page in folder xyz", or does the code have to be in the same folder so there is no need to make that direction. Is it possible that something is not set correctly in my internet settings? I did check that the files were saved with the correct extention .html and not .htm. I know this is a novice questions but any help would be appreciated, the code I wrote is copied below. If any more information is needed I will gladly provide it, Thanks in advance- Bob

    <div id="navigation">
    <ul>
    <li><a href="index.html">home</a></li>
    <li><a href="about.html">about Us</a></li>
    <li><a href="contact.html">contact Us</a></li>
    </ul>
    </div> <!-- end of navigation div -->

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,313
    Mentioned
    178 Post(s)
    Tagged
    9 Thread(s)
    Hi Bob,

    The code you provide is just fine.
    Taking "Home" as an example, what you are telling the browser when you click on the link, is to check the current folder for a file named index.html and load that file.
    If index.html lives in another folder, you can specify it like so:

    HTML Code:
    <a href="xyz/index.html">
    Hope that helps.

  3. #3
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry to all but shortly after I hit send (after I spent 4 hours looking) I found my problem. The files were being saved with a double html tag, so they were being saved as index.html.html. After I renamed them, the links are working fine.
    Thanks-Bob

  4. #4
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Pullo, Thanks I discovered my proble. The files were being saved as index.html.html, once I re-named them the links are working fine.
    Bob

  5. #5
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,313
    Mentioned
    178 Post(s)
    Tagged
    9 Thread(s)
    Hi Bob,

    I'm glad you got things working
    Please don't hesitate to let us know if you need help or advice with anything else.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •