views:

72

answers:

3

I have this problem in IE8 that ignores my first stylesheet link. I don't understand why. It doesn't matter which stylesheet it is, if I switch them it's always the first that doesn't show up and the others work so it is not an error in the stylesheet.

You can see it here on my site:

http://apphacker.com

I created an extra empty stylesheet so it wouldn't break my site. It's called blank.css and it is at the top. It has one rule in it that I'm not using, I just put it there so my other stylesheets would load! But you can see in the Developer Toolbar that comes with IE in the style tab that the blank.css file does not show up in the list of css files available.

Here is the HTTP header my web server is sending for CSS files:

< HTTP/1.1 200 OK
< Date: Fri, 02 Jul 2010 15:38:52 GMT
< Server: Apache/2.2.14 (Ubuntu)
< Last-Modified: Fri, 02 Jul 2010 15:33:38 GMT
< ETag: "360a3-24-48a694f91d880"
< Accept-Ranges: bytes
< Content-Length: 36
< Vary: Accept-Encoding
< Content-Type: text/css

Something I'm doing wrong?

+4  A: 

From your site HTML:

<meta name="keywords" content="irc,adobe air, javascript, irc client" /> 
<meta name="Description" content="Projects by Apphacker: Diomedes IRC, Dionysus a Google Chrome extension and more."

><link type="text/css" rel="stylesheet" href="/site_media/css/blank.css" /> 

Fix your meta element and I bet IE starts behaving correctly.

jsumners
Good case for advocating importance of starting with valid (X)HTML - checking against http://validator.w3.org/ never hurts :-)
Iain Collins
Wow, whoops! Sometimes it just takes an extra pair of eyes. Thank you!
apphacker
No problem.<extra characters>
jsumners
+2  A: 

Ummm.. you forgot to close the preceding meta tag :

<meta name="Description" content="Projects by Apphacker: Diomedes IRC, Dionysus a Google Chrome extension and more."

Maybe that's what's causing the issue.

Andrei
+3  A: 

Your <meta name="Description" tag is unclosed. This might be why the first stylesheet isn't being picked up as IE is using that closing tag to close the meta tag.

greenie