Hi,I''m trying to produce a div layout containing a header on the top with fixed height, a footer on thebottom 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:40pxand 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 ofthe content div, if a top statement is given.How do I realize it correctly? 解决方案A footer that remains in view is a poor design decision, it wastesvaluable screen real estate and for what? Very rarely is there a validreason to keep a footer visible at all times.Given that the header and/or the footer contain text, using px units isa bad decision, remember that you only have limited say over the textsize at the client end.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 requiresgenerating a scrollbar on the "content" div, in-document scroll bars area usability nightmare. The only half decent browser support forin-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.--SpartanicusA footer that remains in view is a poor design decision, it wastesvaluable screen real estate and for what? Very rarely is there a validreason to keep a footer visible at all times.It holds advertisement images.Given that the header and/or the footer contain text, using px units isa bad decision, remember that you only have limited say over the textsize at the client end.Header and footer (nearly) contains images only.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.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* todo it that way, as the customer wants it that way. Is there a solution? Or do I have to go back totables and frames for this? :-/Thanks for input..Grischa It holds advertisement images.Let them scroll. Header and footer (nearly) contains images only.Nearly doesn''t suffice. "absolute" works with firefox, too.Try scrolling this: http://homepage.ntlworld.ie/spartanicus/temp2.htm 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 theadded disadvantage that clients support is not as good.This is a usenet discussion group, not your personal help desk. Proposesomething here and we will discuss the implications, like it or not.Customers rarely have a clue about web design, you don''t have thatexcuse. It''s your job to deliver something that works well.See my previous message.--Spartanicus 这篇关于页眉,页脚,使用DIV和CSS的内容布局?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!