CSS Padding of a nested table ignored by Opera
I am using a table nested in a table which happens to have the border-collapse:collapse;
property. The problem is with the 开发者_如何学Gopadding
property of the nested table, which Opera seems to ignore.
To reduce it to the simplest possible, with the following HTML code...:
<table style="border-collapse:collapse;">
<tr>
<td>
<table style="padding:3em;">
<tr><td>ABCDE</td></tr>
</table>
</td>
</tr>
</table>
...the padding
property is ignored by Opera, whereas Firefox, Chrome and Safari take it into account in the rendering.
My question is: which one is right? Should I leave it this way and ignore Opera users, or search another way to set my padding because Opera is right on the syntax?
In your case I would simply put the padding in the containing <TD>
. If you want to keep it on the table and ignore Opera users, you are not alienating a huge portion of the Web users, though some will no doubt be irritated.
精彩评论