The following experiment is to document how to achieve CSS-controlled background colors in Netscape 4. On block level elements other than tables, such as paragraphs and divs, the Netscape 4 rendering engine usually displays the background inline on the text instead of at the block level. Hopefully this demo will help with XHTML/CSS-P development in areas where Netscape 4 support is still an necessity. It's better to have some creative CSS than worthless table structure.
Margins are still an issue, but that's another story.
Normal <div> with background-color property specified.
Background color only shows through as inline on certain sub-elements such as <code>.
<div> with addition of float property.
Requires a clearing element such as a classed <br /> tag immediately follow to negate the floating behavior.
Width collapses in CSS compliant browsers.
Causes unexpected margins in Internet Explorer 5.
<div> with addition of float property.
float property given invalid value (float:foo;) to negate the floating behavior.
This is invalid CSS and could caused unexpected behavior or bugs.
<div> with addition of border property.
Bug in Netscape 4 displays border outside of container element instead on the element edge.
<div> with addition of border property.
border-style:none to fix bug in previous example.
Recommended solution as it's all valid CSS and displays as expected across multiple browsers and platforms.