Floating left and parent height
This has probably been answered before, but I have spent some time looking and can't find an exact answer.
I have a parent div A that contains two divs B and C.
B and C are both floated left. C has no set height (grows w/ amount of text in it).
The problem: the parent A does not grow to the size of C. I know this has something to do with floating an element not being a part of the normal 开发者_运维技巧document flow, but I don't know how to fix it (setting a height on A doesn't help since it depends on the height of C).
add the property overflow:hidden
to div A
a small div with clear:both after B and C (inside A) should do the trick
精彩评论