Scrollable table not working in IE
socahweir Jan 11, 2012 10:04 PMI have a scrollable table that works great in Firefox, Safari, and Chrome. I cannot get it to work properly in IE. I think the problem is with the CSS, but I can't figure out what is wrong. Here's the CSS code:
div.tableContainer { clear: both; border-right: 1px solid #CCC; border-left: 1px solid #CCC; border-bottom: 1px solid #CCC; height: 285px; overflow: auto; width: 989px; } \html div.tableContainer{ padding: 0 16px 0 0; width: 973px; } html>body div.tableContainer { height: auto; padding: 0; } head:first-child+body div[class].tableContainer { height: 285px; overflow: hidden; width: 973px; } div.tableContainer table { float: left; width: 100%; } \html div.tableContainer table{ margin: 0 -16px 0 0; } html>body div.tableContainer table { float: none; margin: 0; width: 973px } head:first-child+body div[class].tableContainer table { width: 973px; } thead.fixedHeader tr { position: relative; top: expression(document.getElementById("tableContainer").scrollTop); } head:first-child+body thead[class].fixedHeader tr { display: block; } thead.fixedHeader th { background: #BC0001; border-left: 1px solid #CCC; border-right: 1px solid #CCC; font-weight: normal; padding: 4px 3px; text-align: left; font-size:12px; line-height:normal; color: #FFF; } thead.fixedHeader a, thead.fixedHeader a:link, thead.fixedHeader a:visited { color: #FFF; display: block; text-decoration: none; width: 100%; } head:first-child+body tbody[class].scrollContent { display: block; height: 262px; overflow: auto; width: 100%; } tbody.scrollContent td, tbody.scrollContent tr.normalRow td { background: #FFF; height: 35px; border-bottom: none; border-left: none; border-right: 1px solid #CCC; border-top: 1px solid #DDD; padding: 2px 3px 3px 4px; font-family: Arial, Helvetica, sans-serif; } tbody.scrollContent tr.alternateRow td { background: #EEE; height: 35px; border-bottom: none; border-left: none; border-right: 1px solid #CCC; border-top: 1px solid #DDD; padding: 2px 3px 3px 4px; }
Here's the HTML




