...

View Full Version : padding problem



sybil6
10-17-2007, 02:08 AM
<style type="text/css">
* {
margin: 0;
padding: 0;
}
body {
background-image: url(images/main.jpg);
background-repeat: no-repeat;
}

#header {
margin-left:98px;
padding-top:14px;
height:38px;
width:415px ;
font-family:Georgia,verdana;
font-size:12px;
font-weight:bold;
letter-spacing:;
background-color: #7c907e;
color:black;
}


</style>

i have a problem with this piece of code: I need the header to be 38px height(as it is declared in the css) but if i add this padding-top of 14px in it this makes the header grow and not be anymore 38px height...

twodayslate
10-17-2007, 02:11 AM
padding is added on the the height.

so 38(what you want)-14(padding, top and bottom) = 24(what you should put as height)
make the height 24 px and it should work.

sybil6
10-17-2007, 02:15 AM
thank you! this explains everything.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum