Search code examples
htmlcsshtml-tablewidthinternet-explorer-7

Table in IE7 with 100% width overflowing containing div


I have a table of results inside an area div. Because I am using a fluid layout, the area div doesn't have a set width. The width of the table is set to 100%, but in IE7 it overflows beyond the containing div. Any ideas?

HTML:

<div id="area">
    <table id="results">
    </table>
</div>

CSS:

#results{
    width: 100%;
}

Solution

  • Got it! I needed to set white-space:normal for all the TDs and THs within the table.