html - Table not resizing to 100% vertically? -
i have quick problem guys. i'm still learning html, i'm working on personal page , want boxes spread out across entire window, no matter how big or small window is. works great when horizontally, never works vertically. stays in standard format downwards.
my code
html:
<table class="table" border="1"> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </table>
css:
.table { width: 100%; height: 100%; text-align: center; vertical-align: central;
it not resizing because setting table { height:100%; }
telling fill 100% of parent. need set html
, body
height:100%
html, body { height: 100%; margin:0; } .table { width: 100%; height: 100%; text-align: center; vertical-align: central; }
Comments
Post a Comment