开发者

hide <a> text with css

开发者 https://www.devze.com 2023-03-15 12:47 出处:网络
I want to hide the \"HOME\" text and replace it with an image on my wordpress menu. I am using the following css code right now:

I want to hide the "HOME" text and replace it with an image on my wordpress menu. I am using the following css code right now:

li#menu-item-63 a {
background: url(/images/home.png) top center no-repeat;
width: 24px;
height:24px;
float: left;
text-ident: -9999px;
overflow: hidden;
text-decoration: 开发者_如何学JAVAnone;
}

With the code above the image appears but the HOME text is still there. Thanks


text-ident: -9999px; 

should be

text-indent: -9999px;


You could add

color: transparent;

to your style. Will hide the text.


text-indent, not text-ident.

And display: block

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号