JsRender "footer" space

43 Views Asked by At

I'm working with jsrender and i need to use all the space in the page but there is some space in the "footer" that can't be use, i need that the table use the full height

enter image description here

html,
body {
  height: 100%;
  margin: 0;
  font-size: 20px;
  background-color: yellow;
}
<body>
  <table style=" height: 100%;margin: 0;background-color: red;">
    <tr>
      <th>Company</th>
      <th>Contact</th>
      <th>Country</th>
    </tr>
    <tr>
      <td>Alfreds Futterkiste</td>
      <td>Maria Anders</td>
      <td>Germany</td>
    </tr>
    <tr>
      <td>Centro comercial Moctezuma</td>
      <td>Francisco Chang</td>
      <td>Mexico</td>
    </tr>
    <tr>
      <td>Ernst Handel</td>
      <td>Roland Mendel</td>
      <td>Austria</td>
    </tr>
    <tr>
      <td>Island Trading</td>
      <td>Helen Bennett</td>
      <td>UK</td>
    </tr>
    <tr>
  </table>
</body>

1

There are 1 best solutions below

1
Fabian S. On

As youre stating in the comments you want the table to take 100% of the available width, just add width:100%; to your table. Also you should move your table styles from inline-styles to the css.

I added the neccessary styles in the following snippet:

html,
body {
  height: 100%;
  margin: 0;
  font-size: 20px;
  background-color: yellow;
}

table {
  width: 100%;
  height: 100%;
  margin: 0;
  background-color: red;
}
<body>
  <table>
    <tr>
      <th>Company</th>
      <th>Contact</th>
      <th>Country</th>
    </tr>
    <tr>
      <td>Alfreds Futterkiste</td>
      <td>Maria Anders</td>
      <td>Germany</td>
    </tr>
    <tr>
      <td>Centro comercial Moctezuma</td>
      <td>Francisco Chang</td>
      <td>Mexico</td>
    </tr>
    <tr>
      <td>Ernst Handel</td>
      <td>Roland Mendel</td>
      <td>Austria</td>
    </tr>
    <tr>
      <td>Island Trading</td>
      <td>Helen Bennett</td>
      <td>UK</td>
    </tr>
    <tr>
  </table>
</body>