massive problems with extending div
hi,
i have a problem with a site i am developing. we have a news page which - when new articles are posted - has an automatcally extending main div. this would work fine but the problem is that inside this main div thee are three floated divs. this means that the only way to give the main div a background-color is to give it a set height in CSS. )This is a problem of which i was not aware until earlier this week).
This probably sounds confusing so i have given exampe html below:
<div class="main-content">
<div class="column-one">
content
</div>
<div class="column-two">
posts (set by php/mysql)
</div>
<div class="column-three">
content
</div>
</div>
columns one, two and three are all floated within the main div and the main div extends according to how many posts are made in column two. however, the only way of setting a background-color is to give the main div a set height which obviously is unknown.
any ideas? ive been told there is some sort of javascript which can return the height of elements but am unable to find anything myself.do yo know of any jquery script i can use?
any help would be appreciated.