简体   繁体   English

Internet Explorer 8表格填充

[英]Internet Explorer 8 table padding

I made a simple table with only 1 cell that should span 100% width of body and 100% height of body. 我制作了一个只有1个单元格的简单表,该单元格应跨过100%的宽度和100%的高度。 However the text in the cell should not cover the whole page from edge to edge, so I applied a padding left and right to the cell (not the table!). 但是,单元格中的文本不应从头到尾覆盖整个页面,因此我在单元格(而不是表格!)上左右添加了填充。

This works perfectly in all browsers (even IE7 and IE6!!!) except IE8. 这在除IE8之外的所有浏览器(甚至是IE7和IE6 !!!! In IE8 the text in the cell overflows the entire page, without showing a horizontal scrollbar. 在IE8中,单元格中的文本会溢出整个页面,而不会显示水平滚动条。

在此处输入图片说明

在此处输入图片说明

Does anybody identify any issues or could give any clues? 是否有人发现任何问题或可以提供任何线索?

<table id="supportMessage">
<tbody>
<tr>
<td>
<p>Ihr Browser ist veraltet und wird vom Hersteller nicht mehr unterstützt. Die Umfrage kann daher nicht richtig dargestellt werden. Wir sind jedoch sehr an Ihrer wertvollen Meinung interessiert.</p>
<p>Bitte benutzen Sie einen modernen Browser, wie <u>Google Chrome</u> oder <u>Mozilla Firefox</u> oder wenden Sie sich bitte an denjenigen der Sie zu dieser Umfrage eingeladen hat und bitten Sie um Hilfe.</p>
<p>Herzlichen Dank!</p>
</td>
</tr>
</tbody>
</table>

If you need IE8 to test please find a version here: https://turbo.net/browsers 如果您需要IE8进行测试,请在此处找到一个版本: https : //turbo.net/browsers

You my friend are fighting with the IE Box Model and browser defaults. 您我的朋友正在与IE Box模型和浏览器默认值作斗争。 I would suggest adding these attributes to the < table > element 我建议将这些属性添加到<table>元素

BORDER=0 边界= 0
CELLPADDING=0 CELLPADDING = 0
CELLSPACING=0 CELLSPACING = 0

And remove margins and padding from surrounding elements 并删除周围元素的边距和填充

html, body, table, tr, td { margin: 0; html,body,table,tr,td {margin:0; padding: 0 } 填充:0}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM