我有一个用于显示数据的 html 表格。我有典型的 width="100%";但它没有用。这是我的页面的外观和我的 CSS/HTML 样式。如何修复它以自动适应屏幕?
代码:
<table style="border: medium solid #FFFFFF; background-color: #000000; position: fixed;"
border="3" width="100%";>
最佳答案
确保您的 body
元素的 padding
和 margin
设置为 0
Without setting this对比when this is set
html, body{
height:100%;
width:100%;
padding:0;
margin:0;
}
关于HTML 表格宽度 = "100%"仍然不适合 ASP.Net 中的窗口大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20547776/