开发者

Table padding in Internet Explorer

开发者 https://www.devze.com 2023-02-10 10:56 出处:网络
I\'ve noticed that Internet Explorer seems to ignore a table\'s padding. I\'ve tested version 7, 8 and 9.

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

精彩评论

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