I need to have a table along with other UI items in page which resizes horizontally and vertically with the browser window. That means table should accoupy the remaining available space in the browser window and should display horizontal and vertical scroll bars if content of table is more than available width & height.
I can do similer to this by enclosing table in a <DIV> with style as : overflow:auto; height:200px etc.
But things is I don't want to hardcode the height size here in style. Height should be automatically adjusted in the browser.
I did something else as below:
Expand|Select|Wrap|Line Numbers
- <table border="0" width="100%" height="100%">
- <tr>
- <td height="100%">
- <div class="divScroll">
- <table id="myTable" cellspacing="1" class="gridTable" width="100%" height="100%">
- tr td here....
- </table>
- </div>
- </td>
- </tr>
- </table>
- .divScroll {
- position:static;
- height:100%;
- z-index:1;
- overflow:scroll
- }
Any help..code snippet is highly appericiated.
TIA,Sachin