可变高度头...身体填充剩余高度? [英] variable height header... body fills remaining height?

查看:66
本文介绍了可变高度头...身体填充剩余高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看起来很简单但我似乎无法在CSS中完成它。


我想要一个高度可以变化的标题区域..

下面我想要一个填充剩余区域的区域。


什么是诀窍?

轻松完成一个桌子......


非常感谢提前,

布拉德

Seems simple enough yet I can''t seem to accomplish it in CSS.

I want a header area in where the height can vary..
Below that I want an area that fills the remaining area.

What''s the trick?
Easily done with a table...

Many thanks in advance,
Brad

推荐答案

bk***********@yahoo.com 在新闻中写道:1112796334.353360 .127940

@ z14g2000cwz.googlegroups.com:
bk***********@yahoo.com wrote in news:1112796334.353360.127940
@z14g2000cwz.googlegroups.com:
看起来很简单但我似乎无法在CSS中完成它。

我想要一个高度可以变化的标题区域。
下面我想要一个填充剩余区域的区域。
Seems simple enough yet I can''t seem to accomplish it in CSS.

I want a header area in where the height can vary..
Below that I want an area that fills the remaining area.




div。标题{高度:10%; }

div.body {身高:80%; }


或类似的东西?


-

Arctic Fidelity< sp ** @ sacrificumdeo。 net>

< http://www.sacrificumdeo.net>

"谨防上述代码中的错误;我只证明它是正确的,而不是

尝试过它。 - Donald Knuth



div.header { height: 10%; }
div.body { height: 80%; }

or something like that?

--
Arctic Fidelity <sp**@sacrificumdeo.net>
<http://www.sacrificumdeo.net>
"Beware of bugs in the above code; I have only proved it correct, not
tried it." -- Donald Knuth


所以,让我看看我是否有这个权利。你想要一个标题:


< h1> lalalalalala< / h1>


该框会根据需要缩放,在此之下,你还想要一个

区域的内容(我假设)填满了

视口的剩余区域?


Arctic Fidelity 90%正确:
So, let me see if I''ve got this right. You want a header:

<h1>lalalalalala</h1>

That the box will scale as needed, and under that, you also want an
area of content (I assume) that fills up the remaining area of the
view-port?

Arctic Fidelity was 90% right:
div.header {height:10%; }
div.body {身高:80%; }
div.header { height: 10%; }
div.body { height: 80%; }




真的只需要:


..contentArea {height:80%}


您可以只使用标题标题,让浏览器处理

任何调整大小的方框。



really only needs to be:

..contentArea { height: 80% }

You can just use a header tag for a header and let the browser handle
any resizing of the box there.


差不多,但不完全......

假设我知道标题区域是X%高

我不知道标题''内容'的高度


在这个当前问题中,这个标题区显示水平

导航

一个

等级1

等级2

... ..

类型格式


我不知道会有多少行,每行的行高

将是等等......

almost, but not quite..
that assumes I know the "header" area is X% high
I don''t know the header''s content''s height

In this current problem this header area displays the levels of
navigation
in a
level1
level2
.....
type format

I don''t know how many lines will be there, what each lines line-height
will be, etc...


这篇关于可变高度头...身体填充剩余高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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