Fit< TD>页面高度 [英] Fit <TD> height to page

查看:79
本文介绍了Fit< TD>页面高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑一个三行高度为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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆