--- On Mon, 12/13/10, Chetan Crasta <[email protected]> wrote: > I think Firefox, Opera and IE 8 show > the correct behavior. An element > with display:block that is within an inline element > generates a block > box within the context that it is in (the inline box). This > can be > seen when a span with a <p> has display:block and > also in your third > example with text outside the <a>.
Hmmm... it appears that the display: list-item is relevant. Compare the rendering of: 1. <div style="background-color: #ccc; display: list-item;"><a href="#"><span style="display: block;">test</span></a></div> 2. <ul><li><a href="#"><span style="display: block;">test</span></a></li></ul> 3. <div style="background-color: #ccc;"><a href="#"><span style="display: block;">test</span></a></div> Firefox shows extra space within both the implict (2.) and explicit (1.) 'display: list-item' elements. Safari doesn't. Opera shows extra space on 2. but not on 1. Without a 'display: list-item' container, all 3 browsers repress the extra space. - Bobby ______________________________________________________________________ css-discuss [[email protected]] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
