Arin's got a whole new blog

We started the project a while ago, but we are currently in a rush to get all our little projects finished before the Bug's arrival (scheduled May 9th, but I am rooting for a Cinco de Mayo baby) - expecting of course little or no time to work on those little projects once he or she arrives. So go check out a newly redesigned Hairy Alien and tell me what you think.

hairyalien.gif

3 Comments

It doesn't display right in IE, which I'm stuck with at work. :(

I don't have to tell you how much I fucking HATE IE.

Fixed. For the CSS geeks who were wondering - this is a well known bug in IE. It is honestly hard to believe it hasn't been fixed. But essentially IE does not respect the "box model" rules for rendering and placing content areas in the browser. To fix, one needs to construct special rules in CSS that willl only be parsed by IE. Here's how it was done.

My stylesheet:

html>body #container
{ 
  width: 690px;
  margin: auto;
  padding: 0;
}

#container
{
  margin: 0 auto; 
  text-align: left;
  height: 100%;
  border: 0;
  voice-family: "\"}\""; 
  voice-family: inherit;
  width: 690px;
  margin: 0 0 0 46px;
}

Here's what is going on: the #container definition is parsed by IE and contains a special "IE only" margin setting of a 46 pixel left margin. It is only applied to IE because Internet Explorer doesn't recognize the "html>body #container" selector and thus ignores it. However, Firefox, Safari etc DO recognize "html>body #container" because they actually comply with the CSS standard. Now because "html>body #container" is more specific selector than "#container" its rules take precedence over any other styles defined in less specific classes. Thus, Firefox and Safari effectively ignore the 46px margin (technically they override the 46px margin with a zero pixel margin).

And that's that.

That didn't make any sense did it?

Leave a comment

what will you say?


Recent Comments

  • Fixed. For the CSS geeks who were wondering - this is a well known bug in IE. It is honestly hard to believe it hasn't been fixed. But essentially IE does not respect the "box model" rules for rendering and placing conte...

  • I don't have to tell you how much I fucking HATE IE. ...

  • It doesn't display right in IE, which I'm stuck with at work. :( ...

Close