Previous Message
Next Message

expanding divs

Sent by Gunlaug_Sørtun on 28 March 2006 21:09


jeremy wrote:
> I am trying to understand how a DIV expands based on the content 
> inside of it. 
> http://silencematters.com/studio/dave/kaplow/search_test.html

'Collapsing margins'[1] is going on, and the result can be quite
confusing. It *is* standard behavior, so you'll just have to "work it"
into your mind.

Solution in your test-layout, correct to...

..orClause {padding: 1px 0;}

....as the paragraphs top and bottom margins will then be contained -
making <div class="orClause"> expand, instead of ending up on the
outside of <div class="orClause"> and push the other divs away.

regards
	Georg

[1]http://www.w3.org/TR/CSS21/box.html#collapsing-margins
-- 
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: