Forum Moderators: not2easy
please see the attached image
CSS code
<style>
.green-bg {
background: url("images/green_bg.gif") no-repeat;
width: 170px;
height: 24px;
color:#FFFFFF;
font-size:13px;
font-weight:bold;
padding-top: 3px;
padding-left: 10px;
}</style>
<div class="green-bg">
Green Bg
</div>
Thanks
The padding is always going to be added to the div size, the easiest way is to subtract the padding from the width and height, ie.:
width: 160px;
height: 21px;
* Edit: AFAIK this is not the case in IE5, where your code will work fine. but who still uses IE5? ;)