[PLUG] External CSS vs in a <style> tag in the <head> section

Paul Heinlein heinlein at madboa.com
Tue Dec 30 23:59:10 UTC 2008


On Tue, 30 Dec 2008, Richard C. Steffens wrote:

> I have some style code that works when it is in the <head> section 
> of a web page, but not when it is in an external file. Shouldn't it 
> work the same? The style code for the body, #sidebar, and #main 
> sections appear to work correctly. Any idea why the parts between 
> the body section and the #sidebar section are ignored when they are 
> imported from an external file, but work correctly when they are 
> inside <style></style> tags in the .html file?
>
> Here's the current <head> section:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
>  <head>
>    <title>Winter Storm, December, 2008</title>
>    <link rel="stylesheet" type="text/css" href="style.css" />
>    </head>

This looks correct. Are you viewing it via a web server or your local 
filesystem?

If you're using a web server, is "style.css" in the same directory as 
the HTML file quoted above? Is the file readable by the web server? Do 
the logs show a 200 (OK) response when the client requests the 
stylesheet? (Does the client request the right file?)

-- 
Paul Heinlein <> heinlein at madboa.com <> http://www.madboa.com/



More information about the PLUG mailing list