H
Henri
Hi,
I'm trying to display an icon before a link, inside a sentence, using CSS.
My icon is 16x16px large.
It displays well in IE but Mozilla ignore the height style (because a link
is an inline element) and the bottom part of the icon is not displayed.
Isn't there a way to make Mozilla not ignore the height style and get the
icon fully displayed?
(I know I could use a bigger font to get it working but I would prefer
another way)
..linkClass {
height: 16px;
font-family: Tahoma, Arial, sans-serif;
font-size: 12px;
background: transparent url(icon.gif) no-repeat;
padding-left: 22px;
white-space: nowrap;
-moz-user-select: none;
}
<A href="link.html" class="linkClass">Hello</A>
Thanks
Henri
I'm trying to display an icon before a link, inside a sentence, using CSS.
My icon is 16x16px large.
It displays well in IE but Mozilla ignore the height style (because a link
is an inline element) and the bottom part of the icon is not displayed.
Isn't there a way to make Mozilla not ignore the height style and get the
icon fully displayed?
(I know I could use a bigger font to get it working but I would prefer
another way)
..linkClass {
height: 16px;
font-family: Tahoma, Arial, sans-serif;
font-size: 12px;
background: transparent url(icon.gif) no-repeat;
padding-left: 22px;
white-space: nowrap;
-moz-user-select: none;
}
<A href="link.html" class="linkClass">Hello</A>
Thanks
Henri