Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I completely fill a <table> 100% with <tbody> in HTML?

Tags:

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 ?

like image 696
Zaheer Avatar asked Jul 12 '11 02:07

Zaheer


1 Answers

Try adding:

border-collapse: collapse; 

To your table. Or try setting:

display: block; 

or

display: table 

on the tbody element.

like image 188
ElonU Webdev Avatar answered Oct 22 '22 05:10

ElonU Webdev