开发者

Table cell being squashed by content in IE8

开发者 https://www.devze.com 2022-12-17 15:44 出处:网络
I have: <table><tr><td></td><td></td><td></td><td></td><td></td></tr></table>

I have:

<table><tr><td></td><td></td><td></td><td></td><td></td></tr></table>

The td has a css width attribute setting it to 50px.

When content fills the other columns the the cell is squashed below 50px e.g. 32px.

How can I enforce the 开发者_JS百科width with css ?


Set the style table-layout: fixed on the <table> element.

Otherwise you get the auto table layout algorithm, which can be summarised as “let the browser guess, usually wrongly”.

0

精彩评论

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