Recent Changes - Search:

Tables

display property

To override display:none on a table, in IE you need to display:block, while with W3C standards you need to use display:table. (I would've prefered IE's way, plus another attribute for display:table cases.) In javascript, this difference is a pain, so a quick workaround is this:

var DISPLAYTABLEROW;
var DISPLAYTABLE;
if (document.all) {
	DISPLAYTABLEROW = 'block';
	DISPLAYTABLE = 'block';
}
else {
	DISPLAYTABLEROW = 'table-row';
	DISPLAYTABLE = 'table';
}

Then use el.display.style = DISPLAYTABLE;

This probably breaks W3C browsers that return true for Boolean(document.all).

Page last modified on January 26, 2007, at 05:15 PM
View Edit History Print Recent Changes Search