页眉,页脚,使用DIV和CSS的内容布局? [英] Header, Footer, Content Layout using DIV and CSS?

查看:103
本文介绍了页眉,页脚,使用DIV和CSS的内容布局?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在尝试制作一个div布局,顶部有一个固定高度的标题,

底部的页脚使用固定高度和内容层使用浏览器窗口左边的内容。


所以我的标题div定义在顶部:0;身高:40px,我的页脚定义为底部:0;高度:40px

,内容定义为top:40px; bottom:40px;


这与firefox的效果非常好,但不能用于IE,如果给出一个顶级声明,IE忽略了内容div的底部声明




如何正确实现?

解决方案

Grischa Brockhaus< z0 **** @ arcor.dewrote:


>我正在尝试生成一个div布局,顶部有一个固定高度的标题,底部使用固定高度的页脚和使用浏览器窗口左边的内容层。



一个仍然在视野中的页脚是一个糟糕的设计决定,它浪费了宝贵的屏幕空间和什么?很少有有效的

理由始终保持页脚可见。


>所以我的标题div定义在顶部:0;身高:40px,我的页脚定义为底部:0;高度:40px
,内容定义为top:40px; bottom:40px;



鉴于页眉和/或页脚包含文本,使用px单位是

a错误决定,记住你只有有限的说法在客户端的文本

大小。


>这适用于Firefox,但不适用于IE,如果给出了一个顶级声明,IE忽略了内容div的底层声明。

我如何正确地实现它?



IE并不能很好地支持CSS2来做你想做的事情。你还需要

" position:fixed" IE也不支持页脚。


您想要的布局遇到严重问题,需要

生成滚动条"内容" div,文档中的滚动条是可用性的噩梦。对于

文档内滚动窗格的唯一一半体面的浏览器支持是通过框架,并且我希望你知道,

框架带来了一系列自己的问题。


所以你最好把这个想法搞定。


-

Spartanicus


Spartanicus schrieb:


>我正在尝试生成一个div布局包含顶部固定高度的标题,底部使用固定高度的页脚和使用浏览器窗口左侧的内容层。



一个仍然在视野中的页脚是一个糟糕的设计决定,它浪费了宝贵的屏幕房地产和什么?很少有有效的

理由始终保持页脚可见。



它包含广告图片。


>所以我的标题div定义在顶部:0;身高:40px,我的页脚定义为底部:0;高度:40px
,内容定义为top:40px; bottom:40px;



鉴于页眉和/或页脚包含文本,使用px单位是

a错误的决定,记住你只有有限的说法在客户端的文本

大小。



页眉和页脚(几乎)仅包含图像。


>这适用于Firefox,但不能与IE一起工作,因为IE忽略了内容div的底层声明,如果给出了顶级声明。

我该怎么办?正确认识到它?



IE并不能很好地支持CSS2来做你想做的事情。你还需要

" position:fixed" IE也不支持页脚。



" absolute"也适用于firefox。


您想要的布局遇到严重问题,需要

在内容上生成滚动条; div,文档中的滚动条是可用性的噩梦。对于

文档内滚动窗格的唯一一半体面的浏览器支持是通过框架,并且我希望你知道,

框架带来了一系列自己的问题。



Scrollbars也没问题,内容div只包含一个iframe(本身有滚动条)。


所以。我的问题不仅仅是关于布局好坏的讨论吗?我*有*到

这样做,因为客户想要那样。有解决方案吗?或者我必须回到

表格和框架吗? : - /


感谢您的投入..


Grischa


Grischa Brockhaus < z0 **** @ arcor.dewrote:


>留在视野中的页脚是一个糟糕的设计决策,它浪费了宝贵的屏幕房地产和为什么?很少有任何有效的理由始终保持页脚可见。


它包含广告图片。



让它们滚动。


>鉴于标题和/或页脚包含文本,使用px单位是一个错误的决定,请记住,你对客户端的文本大小只有有限的说法。


页眉和页脚(几乎)仅包含图像。



几乎不够。


> IE并不能很好地支持CSS2来做你想做的事情。你还需要
position:fixed IE也不支持页脚。


绝对也适用于Firefox。



尝试滚动这个: http://homepage.ntlworld.ie/spartanicus/temp2.​​htm


>布局你想要遭遇严重问题,需要在内容上生成滚动条。 div,文档中的滚动条是可用性的噩梦。对于
文档内滚动窗格的唯一一半不错的浏览器支持是通过框架,并且我希望你知道,
框架带来了他们自己的大量问题。


Scrollbars也没问题,内容div只包含一个iframe(本身有滚动条)。



iframes具有常规框架所带来的所有问题,而

增加的缺点是客户支持不太好。


>那么..我的问题是否有答案,不仅讨论好的和坏的布局?



这是一个usenet讨论组,而不是你的个人帮助台。在这里提出

的内容,我们将讨论其含义,无论喜欢与否。


>我*有*这样做,正如客户想要的那样。



客户很少有关于网页设计的线索,你没有那个

借口。这是你的工作,提供一些运作良好的东西。


>有解决方案吗?或者我必须回到表格和框架吗? : - /



请参阅我之前的消息。


-

Spartanicus


Hi,

I''m trying to produce a div layout containing a header on the top with fixed height, a footer on the
bottom using fixed height and a content layer using what''s left of the browsers window.

So my header div is defined at top:0; height:40px , my footer is defined as bottom:0; height:40px
and the content is defined as top:40px;bottom:40px;

This works very well with firefox but doesn''t work with IE, as IE ignores the bottom statement of
the content div, if a top statement is given.

How do I realize it correctly?

解决方案

Grischa Brockhaus <z0****@arcor.dewrote:

>I''m trying to produce a div layout containing a header on the top with fixed height, a footer on the
bottom using fixed height and a content layer using what''s left of the browsers window.

A footer that remains in view is a poor design decision, it wastes
valuable screen real estate and for what? Very rarely is there a valid
reason to keep a footer visible at all times.

>So my header div is defined at top:0; height:40px , my footer is defined as bottom:0; height:40px
and the content is defined as top:40px;bottom:40px;

Given that the header and/or the footer contain text, using px units is
a bad decision, remember that you only have limited say over the text
size at the client end.

>This works very well with firefox but doesn''t work with IE, as IE ignores the bottom statement of
the content div, if a top statement is given.

How do I realize it correctly?

IE doesn''t support CSS2 well enough to do what you want. You''s also need
"position:fixed" support for the footer which IE also doesn''t do.

The layout you want suffers from a serious problem, it requires
generating a scrollbar on the "content" div, in-document scroll bars are
a usability nightmare. The only half decent browser support for
in-document scrolling panes is through frames, and as I hope you know,
frames come with a raft of problems of their own.

So you''d do well to bin the idea.

--
Spartanicus


Spartanicus schrieb:

>I''m trying to produce a div layout containing a header on the top with fixed height, a footer on the
bottom using fixed height and a content layer using what''s left of the browsers window.


A footer that remains in view is a poor design decision, it wastes
valuable screen real estate and for what? Very rarely is there a valid
reason to keep a footer visible at all times.

It holds advertisement images.

>So my header div is defined at top:0; height:40px , my footer is defined as bottom:0; height:40px
and the content is defined as top:40px;bottom:40px;


Given that the header and/or the footer contain text, using px units is
a bad decision, remember that you only have limited say over the text
size at the client end.

Header and footer (nearly) contains images only.

>This works very well with firefox but doesn''t work with IE, as IE ignores the bottom statement of
the content div, if a top statement is given.

How do I realize it correctly?


IE doesn''t support CSS2 well enough to do what you want. You''s also need
"position:fixed" support for the footer which IE also doesn''t do.

"absolute" works with firefox, too.

The layout you want suffers from a serious problem, it requires
generating a scrollbar on the "content" div, in-document scroll bars are
a usability nightmare. The only half decent browser support for
in-document scrolling panes is through frames, and as I hope you know,
frames come with a raft of problems of their own.

Scrollbars are no problem, too, the content div only holds an iframe (having scrollbars itself).

So.. Is there an answer to my problem not only a discussion about good and bad layout? I *have* to
do it that way, as the customer wants it that way. Is there a solution? Or do I have to go back to
tables and frames for this? :-/

Thanks for input..

Grischa


Grischa Brockhaus <z0****@arcor.dewrote:

>A footer that remains in view is a poor design decision, it wastes
valuable screen real estate and for what? Very rarely is there a valid
reason to keep a footer visible at all times.


It holds advertisement images.

Let them scroll.

>Given that the header and/or the footer contain text, using px units is
a bad decision, remember that you only have limited say over the text
size at the client end.


Header and footer (nearly) contains images only.

Nearly doesn''t suffice.

>IE doesn''t support CSS2 well enough to do what you want. You''s also need
"position:fixed" support for the footer which IE also doesn''t do.


"absolute" works with firefox, too.

Try scrolling this: http://homepage.ntlworld.ie/spartanicus/temp2.htm

>The layout you want suffers from a serious problem, it requires
generating a scrollbar on the "content" div, in-document scroll bars are
a usability nightmare. The only half decent browser support for
in-document scrolling panes is through frames, and as I hope you know,
frames come with a raft of problems of their own.


Scrollbars are no problem, too, the content div only holds an iframe (having scrollbars itself).

Iframes have all the problems that regular frames suffer from with the
added disadvantage that clients support is not as good.

>So.. Is there an answer to my problem not only a discussion about good and bad layout?

This is a usenet discussion group, not your personal help desk. Propose
something here and we will discuss the implications, like it or not.

>I *have* to do it that way, as the customer wants it that way.

Customers rarely have a clue about web design, you don''t have that
excuse. It''s your job to deliver something that works well.

>Is there a solution? Or do I have to go back to
tables and frames for this? :-/

See my previous message.

--
Spartanicus


这篇关于页眉,页脚,使用DIV和CSS的内容布局?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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