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.
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.
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 :
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â
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 :
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.
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?)
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.
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
<!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
<!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.
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: