Hiding Texts without text-indent
Have you ever come across a situation where setting text-indent to negative value did not help to hide texts on any elements? For me, when any elements are not set to display:block, text-indent didn't work.
So I figured out another tip. Here is how:
.className{
display:inline-block;
color:rgba(0,0,0,0);
}
Setting font-color's Opacity (alpha value) to 0 is the ultimate solution! Make sure, if you have :hover {}, set the same 0 opacity there also.
Written by Shekhar Sharma
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#