Mike at Green-Beast.com wrote:
Lachlan Hunt wrote:
By default, div has no margin and no padding. It doesn't add any
whitespace at all, and it does not insert a carriage return. It is
simply has display: block; and all other properties left with the
default or inherited values.
Fully agree.
Me too - except when we're dealing with IE/win and totally empty divs.
IE's "whitespace bug" tend to see 'a space' in an empty div, and will
add font-size and line-height to the imaginary space.
Rarely ever a problem - especially since few use dimensionless empty
divs, but I just helped out in a case where such an empty, but styled,
div made IE6 crash because of that "whitespace bug".
Solution: make sure IE understands that the div is really empty, by
placing a comment inside it...
<div><!-- --></div>
Georg
--
http://www.gunlaug.no
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************