SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    In the created site is impossible to follow links to different pages of the site

    Good afternoon, ladies and gentlemen!

    My problem is that I can not click on links to different pages in the generated site. Relationship exists between pages of my website with CSS.
    When trying to navigate pages, the browser displays an error and he writes the following: web page not found, page not found for the web address: file :/ / / C :/ Users / user / Documents / Web / about.html Error code: ERR_FILE_NOT_FOUND.

    Thanks in advance for the help!

  2. #2
    SitePoint Addict bronze trophy
    Join Date
    Sep 2005
    Posts
    318
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    The links of your pages are pointing to local files (see: file :/ / / C :/ Users / user / Documents / Web /) You need to change the links to point to files on your server, assuming you are not using your website locally.

  3. #3
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Madison, WI
    Posts
    2,805
    Mentioned
    34 Post(s)
    Tagged
    2 Thread(s)
    It's difficult to give advice w/o seen code or knowing the exact intended context of your project , BUT taking a wild guess, you are using ABSOLUTE links in your HREFS. ( it's been a while since I used Dreamweaver's WYSIWYG , but if I even think there is an option there for using relative and root relative paths)

    Your easiest bet is to do a document-relative path.l let say you site is structured like :

    index.htm
    secondPage.htm
    someFolder
    ---anotherFile.htm

    a link IN the index page to anotherFile.htm would be formatted this way
    href="someFolder/anotherFile.htm"

    a link IN anotherFile.htm to secondPage.htm would be formatted this way
    href="../secondPage.htm"


    ../ means UP one directory. note there is no protocol ( file://, http://) at the start of the href string


    A diferent approach is to do site root relative paths by beginning the href string with a forward slash "/"
    href='/someFolder/anotherFile.htm'
    href='/secondPage.htm'

    hope that helps

  4. #4
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Madison, WI
    Posts
    2,805
    Mentioned
    34 Post(s)
    Tagged
    2 Thread(s)
    I would like to clarify some of the details my site.
    My site consists of the folder "web". This folder consists of the folowing files: basic.html (it mean index.html), about.html, contact.html.

    Here is the lay-out of basic.html (it mean index.html), for example :

    Code:
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <title>Bubble Under - дайвинг-клуб на юго-западе Великобритании</title>
    <meta charset="windows - 1251"/>
    <link href="style1.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
    <div id="header">
    <div id="sitebranding">
    <h1>BubbleUnder.com</h1>
    </div> <!-- окончание раздела sitebranding -->
    <div id="tagline">
    <p>Bubble Under - дайвинг-клуб на юго-западе Великобритании - сделай плюх с нами!</p>
    </div> <!-- окончание раздела tagline -->
    </div> <!-- окончание раздела header -->
    <div id="navigation">
    <ul>
    <li><a href="basic.html">Главная страница</a></li>
    <li><a href="about.html">О нас</a></li>
    <li><a href="contact.html">Свяжитесь с нами</a></li>
    </ul>
    </div> <!-- окончание раздела navigation -->
    <div id="bodycontent">
    <h2>Мы рады, что вы погрузились на наш классный сайт!</h2>
    <p><img src="divers-circle.jpg" width="200" height="162" alt="Группа дайверов тренируется"/></p>
    <p>Круто, что вы заглянули и поделитесь с нами воздухом! Благодаря вашему классному умению ориентироваться под водой вы успешно нашли путь к стартовой
    точке - в данном случае к нашей главной странице. </p>
    
    </div> <!-- окончание раздела bodycontent -->
    </body>
    </html>




    Could you explain to me precisely (seeing the code of the site): What should I do to correct the situation of my site (so you can click on links)

    actually your code is right
    , and seems to work fine locally . I am guess it's the way you are trying to go to these files then that s causeing the issue, and not your code :

    try this using a WEB BROWSER (Firefox, IE, Safari, Opera, Chrome, etc) ... open basic.html. if all your other pages are coded the same way as the example you showed.. you should eb able to navigate from page to page just fine.

    remember just because you have coded some HTML desnt mean you are on the net.. you are looking at these pages locally.


    hope that clears things up a bit

  5. #5
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Somebody! Help me, please! I still do not get to follow links. All code is right.
    Thanks in advance for any information!

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,374
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    How are you viewing these pages?

    Are you typing the location into the address bar of a browser or are you using a preview function of some software such as Dreamweaver? (I saw Dreamweaver mentioned by Dresden above but I don't know where his information came from unless it was from a PM or something?)

    Dreamweaver doesn't allow root relative links to be clicked when you preview them unless you set up a testing server.

    If you can put the site online so that we can see it and if it still doesn't work then we could pinpoint the problem straight away.

  7. #7
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,374
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Received Via PM:
    I am viewing using browser, but I do not put in address bar. I am clicking by tag of a browser with name of a file simply.
    I did not put my site in the Internet. My site is still under development.
    We'll need a little more information about what you are building this site with?

    If as already mentioned above you are just using html and css then you should have no problems following links in your local pages assuming you followed the directions in previous posts about relative links etc.

    The more information you can give us the easier it will be to lead us to an answer.

    Linking to files is the most basic html exercise and is usually straight forward.

  8. #8
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,374
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    You will need to post some more details as we more or less have exhausted the possibilities of solving your problem based on the data we have received.

    Linking to documents is the most simple task and all you need to do is point correctly to the file that you want to load.

    e.g. <a href="page2.html">Page 2</a>

    As long as page2.html resides in the same directory as the page that it is called from it can't fail to load.

    If it doesn't load for you then there is some other problem or some other method you are invoking that we can't guess about. We need to know the exact steps you are taking to load these pages and what software you are using (if any) to make this happen.

    As a test just open notepad and create 2 html pages as follows

    page1.html
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    </head>
    <body>
    <h1>Page 1</h1>
    <p><a href="page2.html">Go to Page 2</a></p>
    </body>
    </html>
    page2.html

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Untitled Document</title>
    </head>
    
    <body>
    <h1>Page 2</h1>
    <p><a href="page1.html">Go to Page 1</a></p>
    </body>
    </html>
    Now use the windows file manager and double click one of those files. You should then be able to navigate between those pages as required.

  9. #9
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,374
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    I've used the three html files you sent me and placed them in a folder called web and they all worked straight away for me. I've attached them in a zip so that you can test locally and compare the structure with what you have set up.

    There were two errors but they caused no problem for me and they are here:

    Code:
    <link href="style1.css" rel="stylesheet" type="text/css"/>
    <meta http-equiv="Content-Type" content="text/html; charset="UTF-8"/>
    There should be no trailing slashes in html4 and you have an extra quote mark in the charset. They should both look like this:

    Code:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="style1.css" rel="stylesheet" type="text/css">
    Anyway test the zip I have attached and see how you get on
    Attached Files Attached Files


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
  •