Home › Forums › CSS › Can’t get rid of empty space at the top of my site › Re: Can’t get rid of empty space at the top of my site
I don’t really know what you’re trying to do here..
#header {
float:left;
width:890px;
margin:0px;
padding:15px;
padding-bottom:10px;
background-image:url(‘images/msl-header-left.png’);
background-repeat:no-repeat;
background-position:top center;
margin-top:10px;
margin-left:-63px;
padding-left:150px;
padding-top:20px;
z-index:10; !important
}
First you say padding: 15px then margin: 0px and at the bottom you write
margin-top: 10px;
margin-left:-63px;
padding-bottom:10px;
padding-left:150px;
padding-top:20px;
The css will apply the last rules over the ones it reads first, so it’s kind of pointless to put the first margin and padding there..
I think it’s better to remove the -top,-right,-bottom,-left rules and put them all together in one margin/padding. This way you won’t make that mistake again :)
So you would do padding: 20px 15px 10px 150px; and margin: 10px 0px 0px -63px; but if you want no white space on top you replace margin 10px with 0px
The order to put the 4 together is (if I’m correct) margin: top right bottom left;
I hope this helped you!