CSS How to make text align the background-color top line
http://jsfiddle.net/5xR8V/
(padding-top : – px not working)
<div class="a">
texttext
</div>
.a{
position: absolute;
top:100px;
width: 200px;
height: 19px;
background: #000000;
font-size: 20px;
color: #FFFFFF;
}
If you want it to be at the top, but still have space at the bottom:
or just the line-height if you want the background colour to be the same height as the letters. 19px will allow for capital letters – if you want it to be just lower case, you could make it smaller, maybe 13px.