开发者

HTML table with fixed header

I have created an HTMl page with three section, header, footer and a table section which is placed in between the header and footer.The header and footer is fixed at top and bott开发者_StackOverflowom using the css (top:0px; and bottom:0px;) with specific height.

All the three are defined in divs.The scrollable table have to be fixed in between the header and footer, ie when we zoomin and zoomout the table have to stretch in between the header and footer.

can anyone help?


Create a div which is positioned where you want it. It sounds like the div needs to be positioned absolutely. (You would need bottom: 31px if the footer is 30px high for example.) You probably want to put the border on this div. Set the div to overflow so that the scroll bar is on the div, not the table.

Then put the table inside the div and give it width: 100%.

Setting height on a table can cause the rows to get really tall if there isn't much content. That's one reason to use the div outside the table.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜