View Full Version : HTML Question
dreamtfk
07-10-08, 09:41 AM
So using Dreamweaver I have redone a webpage as part of my Web Systems assignment using a CSS that one of our project members decided to use for the site. When I view it from my computer at home (where I do the work) it displays correctly. However when I view it from my computer at work it appears the style sheet is not being initialized since all colors are gone and it look very plain. :shrug:
Everything I used to create the page has been uploaded to my webspace as far as I know. What should I look at to correct this? Is there a file that maybe was not uploaded that the html is pointing to? Sorry I'm a rookie at CSS...
http://home.cfl.rr.com/ehayric/Project/about%20us.html (http://home.cfl.rr.com/ehayric/Project/about%20us.html)
You're pointing to a file using exact location, and not relative
<link rel="stylesheet" type="text/css" title="CSS" href="file:///C|/Users/Emir/Desktop/School/Website2/styles/style1.css" media="screen" />
should be
<link rel="stylesheet" type="text/css" title="CSS" href="styles/style1.css" media="screen" />
mbentley
07-10-08, 10:49 AM
You're pointing to a file using exact location, and not relative
<link rel="stylesheet" type="text/css" title="CSS" href="file:///C|/Users/Emir/Desktop/School/Website2/styles/style1.css" media="screen" />
should be
<link rel="stylesheet" type="text/css" title="CSS" href="styles/style1.css" media="screen" />
...as well as all of the links
dreamtfk
07-10-08, 11:35 AM
Ah ok thanks I will look it over when I get home I just didn't have time to do it here at work.
Since you're using Dreamweaver, you should always define your site and ensure the "document" radio button is checked. This will link cache and whatever.
http://img236.imageshack.us/img236/3118/dasdasdsadasdsadsadsadagm6.jpg
dreamtfk
07-10-08, 06:11 PM
Since you're using Dreamweaver, you should always define your site and ensure the "document" radio button is checked. This will link cache and whatever.
But if I leave it set to document then it will be pointing to my hard drive for the css shouldn't it be set to site root?
On a side note I have noticed that everytime I startup DreamWeaver I have to go into my site settings under Remote Info category and enter my username and pw. Although I have checked the save box it only saves it until I close out of DW. Do you know a way around this? It is very annoying...
You're pointing to a file using exact location, and not relative
<link rel="stylesheet" type="text/css" title="CSS" href="file:///C|/Users/Emir/Desktop/School/Website2/styles/style1.css" media="screen" />
should be
<link rel="stylesheet" type="text/css" title="CSS" href="styles/style1.css" media="screen" />
But where is that directory then? Don't I need to upload the style1.css file to my site and then point the link to the directory on my site where it is located?
mbentley
07-10-08, 06:52 PM
But if I leave it set to document then it will be pointing to my hard drive for the css shouldn't it be set to site root?
On a side note I have noticed that everytime I startup DreamWeaver I have to go into my site settings under Remote Info category and enter my username and pw. Although I have checked the save box it only saves it until I close out of DW. Do you know a way around this? It is very annoying...
But where is that directory then? Don't I need to upload the style1.css file to my site and then point the link to the directory on my site where it is located?
that would be called a relative path. for example, if you have a file structure like so:
/Project
/styles
/images
/other
if your .html file are in the webroot (Project) folder and you want to link to the css style in the /Project/styles folder, you just have to reference it as "styles/stylename.css" because the path relative to the location of the .html document is in the directory "/styles" and then the file "stylename.css" is there.
sure you can put the entire path of the styles page as:
"http://home.cfl.rr.com/ehayric/Project/styles/style1.css" but if you ever move the web page from its current location to another server, it won't work. also, it will work both on your local machine as well as on the server with relative paths.
if what i said makes no sense, you might wanna read this:
http://webdesign.about.com/od/beginningtutorials/a/aa040502a.htm
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.