Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS not cascading

Status
Not open for further replies.

thowe

Technical User
Jun 8, 2001
45
US
I'm working in Dreamweaver- I've built my template and also built my style sheet, the site looks great in preview mode (in Dreamweaver) - but as soon as I click on a link, the CSS goes away and all my text is just default times new roman. What am I doing wrong? I've posted my site in order to help diagnose my problem, thank you in advance for your help!



PS: I'm new to CSS so maybe I've just missed the boat alltogether!

~Tanya


Intermediate Dreamweaver user, learning more everyday.
 
Your stylesheet (CSS) resides in a separate, external file. That is good, it is the best way to incorporate css on a page. When you look at the site in preview, dreamweaver makes sure the association to the css file, however when you publish it, it stops. Take a look at this line:
Code:
<link href="file:///C|/Documents%20and%20Settings/tanya/Desktop/mixtecsite/textcss.css" rel="stylesheet" type="text/css">
This is your referral to the stylesheet. As you can see, it is looking for a file on a local computer. Change the href on this to relative path (assuming both html and css file are in the same folder) and copy .html and .css files to your server. Your new code will look like
Code:
<link href="textcss.css" rel="stylesheet" type="text/css" />
This will look for a stylesheet file in the same directory as the file it is calling it. If it is there, all the styles from it will be applied. Hope it makes sense.
 
Note that he said "if it is there". I think you will have to upload it first because I can't find it through the use of your source code.

opinion {
inline-styles: are-messy;
internal-stylesheets: waste-space;
external-stylesheets: are-bliss;
}
 
Thank You!!! to: Vragabond and gohankid77

Sometimes it just takes an extra set of eyes to see the obvious, and I really appreciate your easy to understand corrections! Thanks a bunch to both of you!

Intermediate Dreamweaver user, learning more everyday.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top