开发者

Filling the rest of the page with CSS

I have three Divs on the page and they are absolute positioned. Lets call them leftDiv,middleDiv,rightDiv and middleDiv width is 900px which is okay but the left and right divs should fill the remaining the left and right parts respectively no matter what screen size is.

The reason why I use absolute positioning is because it is the only way to use height:100% to fill the page.

So how can I fill the rema开发者_开发问答ining parts?

Of course these divs separate page into three pieces according to their names imply.

Thanks very much.


Read this carefully: In Search of the Holy Grail


You do not have to use absolute positioning for height. This article explains as do many others.

You may then use float to accomplish the 3 column layout.


Try this in CSS:

#leftDiv {
  top: 0;
  left:0;
}

#rightDiv {
  top: 0;
  right: 0;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜