Chrome 25.0.13 shows percentages as a percentage of width, not height

Chrome just updated itself, and now I noticed that the new version does not display my page correctly. It seems that if I have a margin-top percentage, it bases the margin on the width of the page, and not on the height. Am I doing something wrong?

Here's the test code:

<!doctype html> <html> <body> <div style="margin-top: 50%"> Hello! </div> </body> </html> 

Here is a super short video demonstrating the problem: http://cl.ly/2T0c132T3U2y

Any help would be greatly appreciated.

+4
source share
1 answer

The W3 CSS specification is here:

http://www.w3.org/TR/CSS21/box.html#margin-properties

... says it is as intended. So actually Chrome just implemented it correctly ...

+6
source

All Articles