html code and scripting, web page is viewing weird |
html code and scripting, web page is viewing weird |
![]()
Post
#1
|
|
![]() Marynmissouri ![]() ![]() ![]() Group: Member Posts: 41 Joined: Jan 2008 Member No: 606,116 ![]() |
I have my index.html uploaded and I have uploaded the other pages to view with it. If you click on my website you can view it but if you click on any of the other tabs that direct you the webpage either just shows without images and css style.
So I decided to do an experiment. If you click on the tabs on my webpage and they take you to a page with no images or styles I remove the / forward slash and then you can view my website other then a couple of the tabs such as clients and solutions? Do I need to add some code or script in order for it to view without going to the explorer bar and removing the / at the end to view my pages and so everyone else can view them? Example of pages: index.html http://drama-art.com next: http://drama-art.com/contact/ this is when i click on the tab and I get no images or style. Then id you do this: http://drama-art.com/contact without the / then it shows images and style sheet. Is there something I can do to fix this? Oh and also I need to fix my abut page link, but I'm not sure how? When you click on it it shows this: http://www.drama-art.com/http.//drama-art.com/about/ How can I fix that? Thanks Mary |
|
|
![]() |
![]()
Post
#2
|
|
![]() Senior Member ![]() ![]() ![]() ![]() ![]() ![]() Group: Administrator Posts: 2,648 Joined: Apr 2008 Member No: 639,265 ![]() |
As for the stylesheet issue, you're including your stylesheet like this:
CODE <link rel="stylesheet" type="text/css" href="style.css" "style.css" indicates that the file "style.css" is found in the current directory. I'm guessing it's at the top-level of your website, i.e., at http://drama-art.com/style.css. When you click a link to http://drama-art.com/contact, you're taken to a directory called "contact". But the website is still looking in that directory for "style.css", i.e., it's looking at the address http://drama-art.com/contact/style.css. But there's no stylesheet there, thus, no styling. The solution is to include the CSS like so: CODE <link ref="stylesheet" type="text/css" href="/style.css" Note the leading "/" on "/style.css". This means, "look in the root directory for the file 'style.css'." |
|
|
![]() ![]() |