Forum Moderators: open

Message Too Old, No Replies

My webpages loses its CSS design

         

guarriman

4:48 pm on Dec 14, 2006 (gmt 0)

10+ Year Member



Hi.

I've got a HTML webpage which loses its design sometimes in random webbrowser (like there's no CSS).

If I remove cache or cookies, or I restart my webbrowser, it recovers it. And if I copy HTML source, save it, and browse it with any webbrowser, it works.

It also works when using 'Web Developer' Extension (http://chrispederick.com/work/webdeveloper/) and I deselect 'Disable CSS Styles'.

Does anybody know how to fix it? Thank you very much.

tedster

4:15 am on Dec 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One thing I suggest you check is what mime type is being served for the .css file. It should only be "text/css" and definitely not "text/plain". One quick way to check this is to use the W3C CSS validator and run it on the .css file using its online URL. If a wrong mimetype is being served, you will receive a message about it.

W3C Validator - CSS [jigsaw.w3.org]

rocknbil

6:14 am on Dec 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have had this happen too, across all browsers. Only when it's on the server, sometimes right after clearing the cache - it's like the server doesn't . . . serve it. :-D Usually goes away on refresh.

guarriman

9:19 am on Dec 15, 2006 (gmt 0)

10+ Year Member



tedster:

*) CSS Mime Type. I found this within httpd/conf/mime.types:
-----
text/css css
-----

*) CSS Validator. This is the response:
------
"Congratulations! Valid CSS! This document validates as CSS! "
------

rocknbil:
It doesn't work after refreshing :(

the_nerd

9:53 am on Dec 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



you said you tried it across all browsers. Did you try from another PC? Maybe a firewall/proxy server tries to save time for you and serves up some old stuff?