问题
I have some HTML that inject with Javascript into a web page. The final HTML I inject looks like:
<table style="border-width: 0px; margin 0px; width:100%; height: 100%; padding:0px;">
<tbody style="border-width: 0px; margin 0px; width:100%; height: 100%; padding:0px;">
For some odd reason when I examine tbody in Firebug, its size seems to be 4px smaller than the table. How do I get the to fill up ?
回答1:
try adding the following css to your table:
border-collapse: collapse;
回答2:
Try adding:
border-collapse: collapse;
To your table
. Or try setting:
display: block;
or
display: table
on the tbody
element.
来源:https://stackoverflow.com/questions/6658792/how-do-i-completely-fill-a-table-100-with-tbody-in-html