开发者

Extend background color to fill window yet keep elements in place

http://69.143.137.155/csa-consulting/index.php

I am trying to extend the grey menu bar and the blue background to fill the window (whatever the size) yet keep the content centered at a fixed size. Been working on getting this for a while and cannot seem to figure it out.

Than开发者_开发问答ks!


Use a background image on the <body>.

.body {
    background:#F2F4EE url(menu-bar.jpg) TOP CENTER REPEAT-X;
}


Try adding the width style to your nav class. Like so

.nav
{
    width: 100%;
}


Remove the following declarations from #container:

margin-left: auto;
margin-right: auto;
width: 1024px;

Add the following declaration to body:

margin: 0;
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜