tags:

views:

27

answers:

1

I have created a HTML page with three section. One header at the top, two a table at the middle and a footer at the bottom. All the three is defined in three divs. The Header is fixed at the top using the css property ( top:0px; position:fixed;), likewise the footer is fixed at the bottom using css property (bottom:0px position:fixed;).

The table have to be fixed in between the header and footer in all conditions, ie when the browser is zoomed in or zoomed out the table have to be fixed between the header and footer.

To be more specific the top of the table have to stick to the bottom of the header and the bottom of the table have to stick to the top of the footer, I think the table have to exhibit some fluid property.Is there any thing like that.

Can anyone help?

A: 

Try the following:

<html>
<body style="height:100%;width100%;padding:0;margin:0">

<div style="position:fixed:top:0;width:100%;height:10%;background-color:red;">
    Header
</div>
<div style="position:fixed:top:10%;width:100%;height:80%;background-color:green;overflow:auto">
    <table>
      <tr><td>Table / Middle</td></tr>
   </table>
</div>
<div style="position:fixed:top:90%;width:100%;height:10%;background-color:blue;">
    Footer
</div>

</body>
</html>
cesarnicola