开发者

IE8 doesn't respect table padding

This is a screenshot of a table in Chrome 5.

IE8 doesn't respect table padding

The same table rendered in IE8:

IE8 doesn't respect table padding

You can view the page here: http://labs.pieterdedecker.be/vspwpg/?page_id=96

This CSS rule adds the p开发者_开发知识库adding that IE8 won't respect: td#content table.subitems { padding: 5px; }


Try adding the padding to the td/th elements under the table, not the table itself. The table cells / headings get zeroed out by *{margin:0;padding:0;} as well, so you have to explicitly specify.

Edit: If you don't mean to put padding on every table cell/heading then try a margin on the table or padding on a table wrapper div.


I ran into the same problem with my site. The class was applied to the <td> tag but its padding was not showing up. Then I declared the padding inline, and it showed up fine. I nearly put a fist through my monitor, but when I realized that would hurt me and not IE, I refrained. It's not pretty, but it works.

<td class="doesntMatterBecauseIEHatesYou" style="padding:10px;">Horray, IE doesn't hate you anymore. But you still hate IE.</td>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜