CSS not loading (wtf)

Status
Not open for further replies.

Deltron

Seniorius Lurkius
3
For the life of me I can't figure this out. :confused:

To load my sheet, I'm using:
Code:
<style type="text/css" media="all">@import /html//civis/threads/"default.css";</style>

IE and Opera load the page with CSS, but Mozilla shows the non-CSS-enabled view.

Website in question is located at http://home.iglou.com/dpw/

Any suggestions are greatly appreciated.

Deltron
 

Greg Hines

Ars Tribunus Militum
1,686
Subscriptor++
<style type="text/css">CODE { font-family: "Courier New", "Lucida Console", monospace; color: red; }</style>

Try removing the <code>media="all"</code> attribute from the <code><style></code> element. Browsers should default to <code>media="all"</code> (some may default to <code>media="screen"</code>) if it's excluded.




I'm not entirely certain this will fix your particular problem, but historically, specifying the media for a specific style sheet has caused problems in many browsers so it's somewhat likely this could be the cause of the problem.




Also, I don't recommend using the method Silent Fade recommended. IE4/Win will import style sheets if you use <code>@import url(/html//civis/threads/"default.css");</code> but it won't import style sheets if you use <code>@import /html//civis/threads/"default.css";</code> which makes the latter the preferred method if you're trying to preclude rendering by non-compliant browsers (and it looks like you are judging by the WaSP statement at the top of your page).

 

technophile

Ars Legatus Legionis
23,768
Originally posted by MalusCaelestis:
Try removing the media="all" attribute from the <style> element.

I'm not entirely certain this will fix your particular problem, but historically, specifying the media for a specific style sheet has caused problems in many browsers so it's somewhat likely this could be the cause of the problem.
He was having the problem in Moz, which is 100% CSS1 compliant, so that couldn't have been the problem AFAIK.
 
Status
Not open for further replies.