[IE7 - Known Issues][CSS] 'border-collapse' does not override cell spacing related tags

| | 1 min read

Many a times, IE7 stands out from the group of modern web-browsers owing to its notorious incompatibility with many a standard HTML/CSS/JS. In this article, we are seeing the following case of incompatibility: In IE7, the CSS 'border-collapse' does not override cell spacing related tags.

While adding content using CKeditor in Drupal, users may add inline CSS to style the content. We can style each element in this content using our CSS to match the design of our site. In the case of table element, if we set HTML attribute cellSpacing on the table, like

<table cellspacing="5" cellpadding="0">

then we can remove this cellSpacing by making following changes in our CSS:

table {
 border-collapse: collapse;
}

It will remove cellSpacing and table will look like this:

table-ff.jpg

But it will not work in IE7 browser. ie., CSS settings like

border-collapse: collapse

does not override an cellspacing HTML attribute on the table element. See the following image for details:

table-ie.jpg