Elliott C. Back: Technology FTW!

Spreadfirefox.com IE rendering bug

Posted in Browsers, Code, General, Spread IE by Elliott Back on August 18th, 2005.

Spreadfirefox.com doesn’t render properly in IE–the text is all centered, when it should be left-justified:

Spread Firefox Can't Render

See on line 610 of their massive CSS file, they set:

.content {
  text-align: center;
}

And then nothing else–what do you expect? What am I missing? I can’t begin to seriously decode their messy CSS, though…

This entry was posted on Thursday, August 18th, 2005 at 8:46 pm and is tagged with css file. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback.

Viewing 4 Comments

    • ^
    • v
    does this mean that it's really supposed to be centered at all?
    • ^
    • v
    You know what happened when I opened up IE to check this bug out?
    It crashed as soon as I clicked the evil E and sent an error report to Microsoft. I'll stick with firefox as my browser.
    • ^
    • v
    Speaking of mangled CSS, have you taken a look at this stylesheet lately? No newlines or spaces between statements makes it very difficult to read. If you're going to compress text, use mod_deflate, mod_gzip, or IIS's compression support--it's faster, simpler, and more efficient than running a PHP script to mangle your finely-crafted syntax.

    I wrote an 8 line perl script to reformat the results of your script, and calculate that it reduces a 7340 byte CSS file to 6556 bytes, a 10.6 percent reduction in size. Mod_gzip reduces that same file to 1793 bytes, at a compression ratio of 75.6 percent. As an added bonus, that compression can apply to all text documents you serve, without destroying their readability. Try it out--setting up server side compression is easy to do, and can definitely help out if you are bandwidth-concious. :-)

    For reference, here's the script:


    #!/usr/bin/perl
    foreach (<>) {
    s/\;(?! })/\;\n\t/go;
    s/\;(?= })/\;\n/go;
    s/{/{\n\t/go;
    s/}/}\n\n/go;
    print;
    }


    All that being said, I have no idea what's up with spreadfirefox.com's stylesheets. Have you sent them an e-mail about it?
    • ^
    • v
    Heh, Aphyr. The stylesheet is actually squished and then gzipped compressed, so I get the benefit twice over. And, on the server it looks just fine to /me/ when I edit it, so as long as it's still valid, I don't really care how it comes out the client side! I'm getting 1,745 bytes which is a whole 48 bytes smaller than you ;)
 

Trackbacks

(Trackback URL)

close Reblog this comment
blog comments powered by Disqus