Just Another Blog

Are you thinking what I'm thinking?

Wednesday, July 20, 2005

CSS absolute positioning pop quiz

Given a html element with a min-width of 1000px, and an absolutely positioned block that sticks with the top right corner, what would it be positioned when the inner width of the window is less than 1000px (e.g. resizing the window, reducing the screen resolution, etc)?

  1. The block should sticks with the html element.
  2. The block should sticks with the window.

I found that only Mozilla chooses the first option, which is what I wanted. Other browsers (IE, Opera, Konqueror) choose the second option. While I think Mozilla is the only right one, I'd file a bug in bugzilla if it is actually wrong.

P.S. I use the expression hack to emulate min-width in IE.


Note that troll and spam comments will be deleted without any notification.

Post a Comment

<< Home