Last Updated: February 25, 2016
·
1.11K
· shekhardesigner

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.