Thursday, October 30, 2008

Internet Explorer CSS Quirk (border-spacing)

Consider the following CSS class:

.test
{
    border-spacing: 0px; /*Only works in Firefox */
    border-collapse: collapse;    /*Works in Firefox and IE */
}

With the border spacing CSS style attribute set to zero pixels, Firefox and IE render differently:

Internet Explorer:

ie

Firefox:

firefox


Moral: Use "border-collapse: collapse;" when you want no border spacing in your tables.

0 comments: