CSS Help
- Started
- Last post
- 6 Responses
- elee0
hm, that works, but I guess that my bigger issue is that the parent div isn't expanding to the height of the children when the float is there. Do you know of any way to get around this?
- foobaz0
You need to clear floated elements.
I think this is what you're looking for:
<div style="background-color:#F00">
<div style="float:left">Background isn't red</div>
<div style="clear:both;"></div>
</div>
- Continuity0
Yup, clearfix.
- airey0
if i understand what you mean then you need to add a clearing float div(selector) under the child div inside the parent div. look it up via google and see if thats what you need.
- elee0
ahh, that did the trick. Thanks everybody
- Continuity0
<div style="background-color:#F00">
<div style="float:left; background-color: inherit;"> Background isn't red</div>
</div>