View Full Version : Background color alignment

01-03-2011, 06:35 PM
I have 4 divs in play. The 'top' div runs across the page and has content making it about an inch tall. It's fine. Below it I have a "container" div that again runs across the page. Inside it I have two child divs, one floated left, and one on the right margined left at 250PX. Everything with the positioning of internal elements is fine, they line up perfectly with other side to side...

Here's the problem:

The left child div has a yellow background color for accentuation. This background color is not lining up all the way to the div above it, i.e. up to the 'top' div, as it I want it to, and as it correctly does in design view. There is a white space like a line break has been thrown in, inbetween the child divs and the 'top'div. This whitespace can be seen in design view and seems to be residing in the parent 'container' div.

I've tried giving the 'container' div the same background color, and still the whitespace remains. I suspect my floated element is interfering with the 'container' div precedence...
Thoughts anyone?


d a v e
01-03-2011, 06:37 PM
URL would be really helpful :)

01-03-2011, 07:15 PM
Thanx, I got it... I got rid of the parent div...