[CSS] Top banner not filled

Status
Not open for further replies.

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
So here's my problem. I need my top banner to fill the whole top. I would like the right and left and top to be filled:
cYsu81N.png


Here's my current code:
PHP:
 body
{
    background-image: url('bg.png');
}
 
div#banner
{
    background: #19A3D1 url('banner.png') no-repeat top left;
    padding-top: 64px;
}
 
/*
  div#banner-content
{
    width: 900px;
    margin: 0 auto;
    padding: 10px;
}
 
*/
 
div#main-content
{
    padding-top: 70px;
}
 

St4nley

Member
Apr 13, 2013
469
76
div#banner
{
background: #19A3D1;
padding-top: 200px;
margin-top:-70px;

}
Make margin just go above page, and make padding bigger to compensate.

so negative margin
 

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
div#banner
{
background: #19A3D1;
padding-top: 200px;
margin-top:-70px;

}
Make margin just go above page, and make padding bigger to compensate.

so negative margin

Didn't quite work. Sorry, I'm not good with scratch css work xD
 

Sean

‫‫‫‫‫‫  ‫  Don't Worry, Be Happy
Dec 12, 2011
1,121
405
Easy fix, you need to set the margin to 0 in body,

so in the body tag add

margin: 0 auto;
 
Status
Not open for further replies.

Users who are viewing this thread

Top