简体   繁体   English

应用CSS样式后如何获取我的表格大小

[英]How to get the my table size after applying css styles

i am having one div, which contains one table. 我有一个div,其中包含一张桌子。 i want to apply the table-width to div element. 我想将表宽度应用于div元素。 My table cells having padding 5, so table width is not correct in IE browser, while the mozila the sample code works. 我的表格单元格具有填充5,因此表格宽度在IE浏览器中不正确,而mozila示例代码有效。

Have you tried setting table's width to 100% using CSS? 您是否尝试过使用CSS将表格的宽度设置为100%? This will automatically resize it to fit the parent div's width. 这将自动调整其大小以适合父div的宽度。

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

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