Is IE6 a bad guy or a good guy, is it time for IE6 to die or not (don't be racist!), 20% of Internet users are still using IE6 today, in the middle of year 2009.
Definitely, there is set of fixed rules and math that handle everything.
Some magic advices googled from the Internet. Sometimes these avices help, sometimes not.
A case study. Doc type is XHTML 1.0 Transitional here.
We have got 3 divisions:
If distance between the Inner and the Between is less than 3px, IE6 adds some space below the inner element. That occurs usually when the Inner has a declared width that gets closer than 3 px.
If distance between the Between and the Outer is less than 3 px, the Inner doubles last characters and leaks them outside itself.
Distance between the Between and the Outer becomes less than 3 px if:
The more inner-div like divs preceed to it, the more bespoke one leaks.
Placed just a not-styled div around the inner-div - leakage stopped.
If something touches div's right wall from inside, the div leaks some characters placing them below himself.
Floatedness doesn't play any role here.
Leave at least 3px distance. Make the inner div 3px narrower.
This construction doesn't work:
This construction works:
Most often the leak happens when the outmost div of the html page is touched by any of the inner divs.
In combination with several other conditions, anything that touches the right wall, can cause any other same level div, that's located above, to leak.
For IE6 - leave at least 3 px space right of every division,
Frequently, all 100% widhts will cause IE6 character leak or double space.
Frequently, mixed 100% and fixed -3px widths are OK.
Almost aways, all -3px fix widths are bulletproof.
Sometimes an element X somewhere many floors above triggers the leak from an element on the bottom. All those 3px spaces doesn't help.
Placing <div><!-- --></div> right after the element X stops the leak below.