I'm currently working on a class that combines a background image with text. My goal is to find a way to adjust the spacing specifically above the text without impacting the position of the entire element (image + text) using the "margin" property. I need precise control over the text only.
While the text-indent property helps with horizontal spacing, I am looking for a method to manipulate the space above and below the text exclusively if such an option exists.
Below is the CSS class code:
.contactb { float:left; margin:0 5px 0 0; padding:0 0; background:url(images/contact_b.png) top no-repeat; display:block; width:108px; height:57px; font-family: 'hand-webfont'; color:black; font-size:17px; }
And here's the corresponding HTML code:
<li><a href="contact.html" class="contactb">Contact</a></li>