开发者

Table padding in Internet Explorer

I've noticed that Internet Explorer seems to ignore a table's padding. I've tested version 7, 8 and 9.

What is the best workaround? I prefer a workaround that's based purely on CSS than one that involves wrapping tables in <div>s or messing with tag开发者_如何学Cs in general.


Try this:

td
{
   display: table-cell;
   padding: 30px;
   border: 1px solid #000000;
}

As seen on jsfiddle.


I have found that this actually works as a fallback for flex box in ie9. And while the original question has nothing to do with CSS flex,and this is probably a repeat, it solved an issue for us, so I will mention it here and hope it helps others. flex: .selector { display: flex; } and no flex fallback: .no-flexbox .selector { display: table-cell; padding : 25%; }

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜