display:inline-block and text-indent
Posted
by Daniele Cruciani
on Stack Overflow
See other posts from Stack Overflow
or by Daniele Cruciani
Published on 2010-03-05T11:48:29Z
Indexed on
2010/03/18
9:51 UTC
Read the original article
Hit count: 462
I am experiencing a problem with the following code in some versions of Internet Explorer:
#iconautente{
background-image:url('/style/images/spritecommon.png'); /*icona_utente.png*/
background-position:-117px -15px;
text-indent:-9000px;
width:20px;
height:23px;
display:inline-block;
}
<a id="iconautente" href="/admin/index.php">admin</a>
In Firefox, IE7 and IE8 under Vista, I see background and no text, as expected. In IE6 and IE8 under XP, the whole image is indented, not text, so the image is not shown.
What should be the right behavior? Is there a workaround?
© Stack Overflow or respective owner