psteinweber
psteinweber

Reputation: 813

Hide text that doesn't have specific selector

Suprisingly I couldn't find an answer to this one anywhere - I might be using the wrong words...?!

Is there a possiblity to hide the word "English" from the following snippet with pure css? In terms of a display:none, so is doesn't take up any space:

<li class="menu-item menu-item-language menu-item-language-current">
    <a href="#" onclick="return false">
        <img class="iclflag" src="/wp-content/plugins/sitepress-multilingual-cms/res/flags/en.png" width="18" height="12" alt="English" title="English" />
        English
    </a>
</li>

Thanks!

Upvotes: 0

Views: 54

Answers (1)

Paulie_D
Paulie_D

Reputation: 115278

You could set the font-size to zero.

a {
    font-size:0;
}
   <a href="#" onclick="return false">
        <img class="iclflag" src="http://lorempixel.com/output/people-q-c-18-12-10.jpg" width="18" height="12" alt="English" title="English" />
        English
    </a>

Upvotes: 2

Related Questions