W3C home > Mailing lists > Public > www-style@w3.org > May 2012

[CSS21] can't account for vertical space between inline box and its block-level container

From: Roger Baker <tstartme@hotmail.com>
Date: Thu, 3 May 2012 12:26:59 -0400
Message-ID: <SNT127-W2360CDB72612F4412FBE8D32F0@phx.gbl>
To: <www-style@w3.org>

Hi,I'm trying to account for the space above and below an inline box and its block container in a situation such as this:
http://jsfiddle.net/QAnfr/1/
As I understand the situation,
(1) The height of the inline box is equal to the height of its content area (em squares) because line-height is set to 1. (section 10.8.1)(2) The height of the line box is equal to the height of the inline box's content area. (section 10.8)(3) The height of the content area of the block-level container (p) is equal to the height of the line box. (section 10.6.3)
So, the heights of the inline box, line box, and content area of the containing block are all equal. Furthermore, the border areas of both the inline box and the block-level container are just outside their content areas. Given all that, shouldn't the borders of the inline box and its block-level container coincide (contrary to observation)?

Thank you, 		 	   		  
Received on Sunday, 6 May 2012 05:25:17 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:53 GMT