I did try height:auto. Here is the wrapper css:
Main Topics
Browse All TopicsHi,
I have a div wrapper with coloured background and border. inside this are various other divs with text and image content. Everything was fine until trying on IE8 and the #wrapper does not surround the content anymore. The width is fine but the backgound does not extend much past the header. In compatability view however it works ok.
I have height:100% for the #wrapper and have also tried min-height but to no avail. Is there a workaround that anyone knows of?
Thanks.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I was mistaken; this is indeed not a bug. If we were dealing with nested divs here then we would expect the innermost div to have the same height as its parent and thus overflow its parent by 10px due to its vertical borders. However, tables, table cells and table rows have expand-to-contain behaviour, and so IE8's rendering is correct: the black-bordered TD expands to contain its red-bordered child div. Moreover, the meaning of percentage values for height on TDs is unspecified. From CSS21:[1]
"In CSS 2.1, the height of a cell box is the maximum of the table cell's 'height' property and the minimum height required by the content (MIN). A value of 'auto' for 'height' implies that the value MIN will be used for layout. CSS 2.1 does not define what percentage values of 'height' refer to when specified for table cells."
Thanks Sevensnake, but I am not using any tables or forms.
I have now discovered the problem is due to the content of the wrapper DIV being floated left. As soon as the content consists purely of floated DIVs (which it will do), the wrapper fails to wrap and the background is not visible. If I put in some <p> tags then the background becomes visible as far as the lowest <p>
Any ideas?
Thanks, Jerry
Business Accounts
Answer for Membership
by: sevensnake77Posted on 2009-06-24 at 12:03:05ID: 24704552
did you try height auto. if not please post a link to the site. or the css.