how to hide text on a tag without removing text inside :before pseudo element css -


i hide text inside tag, keep text inside before pseudo element, without change html , without javascript

<a href="#">text hidden</a> 

css

a:before{     content: "i need show up" } 

this wipes out of text

a {     text-indent: -999em;     display: inline-block; } 

little fiddle https://jsfiddle.net/5wrs1ft1/

i don't think it's possible, unless wrap text element <span>.

a > span {      display: none;  }  a:before {      content: "i need show up"  }
<a href="#"><span>text hidden</span></a>


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -