CSS Help!
January 25, 2006 11:54 AM
Subscribe
CSS help: If I have an element that contains two other elements that add up to less width than the container element, should the container element's background color not be visible between those elements?
I have an element called #container that is 400px wide. Inside that I have two elements, one 100px wide and one 200px wide. The first is floated left, the second floated right. In between these boxes is 100 px. For me, on all browsers, that space is appearing transparent, rather than the specified background color for #container. Why?
posted by Al_Truist to computers & internet (7 comments total)
This is typically overcome by making sure there is a clearing element (a DIV or a BR with clear: both applied to it) as the final element in the parent container.
posted by o2b at 12:16 PM on January 25, 2006