Fit< TD>页面高度 [英] Fit <TD> height to page
问题描述
考虑一个三行高度为10,*,10的表格。我希望中间的单元格高到足以适应垂直页面。不幸的是,高度:100%在表格,tr或td级别不起作用,可能是由于标准。即使碰巧工作,我不想100%,我想100%的clientHeight-20px :)我总是可以编写脚本来计算剩余的clientHeight,但我不知道它是否可以在HTML / CSS标准中实现。 p>
注意:如果还有其他方法可以更好地布置它们,我只使用表格进行布局,我也可以使用这些方法。
尝试离开表格并使用CSS。
这是google上的第一个链接(搜索:css页面布局)
http://www.maxdesign.com.au/presentation/page_layouts/
你会在开始时花更多时间,但是你会爱上CSS 。
问候,
洛伦佐。
Consider a table with three rows with heights 10, *, 10. I'd like the middle cell to be high enough to fit to the page vertically. Unfortunately "height:100%" doesn't work at table, tr, or td level, possibly due to standards. Even if it happens to work, I don't want 100%, I want 100% of clientHeight-20px :) I can always write script to calculate remaining clientHeight but I wonder if it can be achieved in HTML/CSS standards.
NOTE: I'm using table just for layout, if there are other ways to lay them down in a better way I'm ok with those approaches too.
Try to leave table and use CSS. This is the first link on google (searching: css page layout) http://www.maxdesign.com.au/presentation/page_layouts/
You will spend more time at beginning, but then you will love CSS.
Regards, Lorenzo.
这篇关于Fit< TD>页面高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!