PDA

View Full Version : Not picking up CSS


mattalexander
03-19-2006, 08:41 PM
Hi

I've created some new templates and pages but when I preview or open in IE the the pages appear to not be picking up the style sheets. The sheets are definitely attached as I can see them when I view the source code.

When I'm editing in Dreamweaver all the formating is there. It just all disapears when I view in IE. If I preview a temporary copy of the page all the formatting appears.

I've been using Dreamweaver for ages and never had this problem. Can anyone tell me what's going on?

Any advice much appreciated.

Thanks

Matt

Creative Insanity
03-19-2006, 09:12 PM
show us something.

mattalexander
03-19-2006, 10:07 PM
OK

Below is an examle of one of my pages.

http://www.onlinebets4free.com/onlinebets4free_new/online-bookmakers/victor_chandler.htm

All templates and style sheets are uploaded to the testing server.

I've attached a screen grab of how the page looks when DW creates a preview copy.

Thanks

Matt

Creative Insanity
03-19-2006, 11:08 PM
You have 2 style sheets link so one would cancel the other one out.
Try and keep to one per page it you have more or use IDs for each section.
<link rel="stylesheet" type="text/css" href="/styles/layout.css">
<link rel="stylesheet" type="text/css" href="/styles/navigation.css">

domedia
03-19-2006, 11:30 PM
You have 2 style sheets link so one would cancel the other one out. This is simply not true. Having several stylesheets is quite normal, you can link to several stylesheets.

I've been using Dreamweaver for ages and never had this problem. Can anyone tell me what's going on?
The problem lies in how you link to your stylesheets, simply remove the first slash, which asks for the browser to look for the stylesheet in the root of your domain.
<link rel="stylesheet" type="text/css" href="styles/layout.css">
<link rel="stylesheet" type="text/css" href="styles/navigation.css">

Creative Insanity
03-20-2006, 01:01 AM
Opps my bad LOL

mattalexander
03-20-2006, 06:57 AM
Thanks guys.

I've used up to four style sheets before and never had a problem. I'll try removing the slashes when I get home tonight. I thought it would be something simple, so hopefully that should sort it out.

Matt