Thursday, January 3, 2013

CSS Position Absolutely Got Better?!

Very odd, now "position: absolute" with both top and bottom (or right and left) works to affect layout! At least in Webkit browsers. Chrome and Safari.

Do you folks know what that means? Sane layout is now possible using CSS. And so, 2013 is looking to be a great new year already.

Unbelievable: Progress!

Chrome snapshot:



Imagine resizing and having the layout follow suit perfectly.

But not in Firefox. See how it falls -- wait for it -- flat:



Seems that the vertical layout just collapses.

Worth noting: I've never seen any documentation say that it should not work, i.e no wording like "but if you apply both left and right, or both top and bottom, results are undefined". But I haven't really read the spec.

So, when did this happen, recent Christmas?


------ update -----

Firefox 17: no change.
(Oh I wasn't quite up-to-date...)
Firefox 18: no change.

No comments:

Post a Comment