empty table cells in IE6
If you are using tables on a web page that may have empty cells, the cells won't display properly in IE6. When IE6 attempts to display a table cell and the cell is empty, it'll fail to draw the border around the table cell and it'll look really funny. There are two relatively easy ways to fix this problem.
1) Don't have empty table cells. If you want a table cell to look empty, put in a non-breaking space, &nbps;, instead. It'll look empty to the user, and IE6 will render it correctly.
2) If putting in a bunch of non-breaking spaces offends you sensibilities, there is a CSS solution available also. You can set the border-collapse property of your tables to collapse and the empty-cells property of table cells to show. Basically, the CSS would look like this...
Either of these solutions should get empty table cells rending correctly in IE6.
1) Don't have empty table cells. If you want a table cell to look empty, put in a non-breaking space, &nbps;, instead. It'll look empty to the user, and IE6 will render it correctly.
2) If putting in a bunch of non-breaking spaces offends you sensibilities, there is a CSS solution available also. You can set the border-collapse property of your tables to collapse and the empty-cells property of table cells to show. Basically, the CSS would look like this...
table {
border-collapse: collapse;
}
td {
empty-cells: show;
}
Either of these solutions should get empty table cells rending correctly in IE6.
| Rating: | 66% positive, 3 total Votes |
| Categories: | HTML CSS IE6 |
| Added: | on Nov 11, 2008 at 12:24 pm |
| Added By: | an anonymous user |
| Searches: | cell ie6 table empty css |


table
{
empty-cells:show;
}
table tr td{ _height: 1em;}