Im using a float to put a menu on the left side, then I want the remaining space on the right side to be taken up by another div so the div next to the float Im using margin-left to go as far as the total div width that is floating left. The problem is in Google Chrome the div on the right only goes, width wise, as wide as the content inside the div. Firefox and IE both use the whole space remaining on the right side but just in Chrome the width doesnt go all the way to the right.
Hard to say at this point…make sure the content_left is floated.
If so, then put a border around each. See if there is enough room…if that doesn’t help at all then PM me the link/login and I’ll look at it (you can trust me :))
Sweet, that worked! Thank you very much. Question though, I had asked a similiar question awhile back and the answer was to use the margin for a 2 column layout. Why would I need to remove it in this instance?
I didn’t look too much into it in this case, there was probably something conflicting with it, you normally should use margins yes, but you have something else going on. If you REALLY want to know I’ll take a look.
Well that would be up to you, but if you could take another look at it that would be very appreciative because if Im doing something wrong I would like to know so I can do it correctly in the future.
Ok I will take a look, I thought though the clear both was limited to the div its inside of, #content_left. But your saying the clear both also affects divs outside of #content_left?
If the clear is in that floated column like that, theni t will clear the subsequent element adjacent to the floated element, in this case, #content_right
Ok I will take a look, I thought though the clear both was limited to the div its inside of, #content_left. But your saying the clear both also affects divs outside of #content_left?
“clear” affects all previous floats in the html unless the parent of the cleared element is a float itself or the parent has overflow other than visible (haslayout is needed for IE6) . More info here.