Oscar Fanelli
Oscar Fanelli

Reputation: 3677

Link with only background

I have a strange trouble with css.

Take a look at the first element of the menù (Home) of this site (is a beta): http://nightly.gamempire.it/

I want to remove the "Home" word from the first element (and leave only the house icon). I tried removing the word, but it break the style of the element.

If I set to the property

body > nav a.master { width: 30px; overflow: hidden; }

it break the style of all the menù.

What can I do? Thanks

Upvotes: 0

Views: 54

Answers (2)

ralph.m
ralph.m

Reputation: 14365

Another option would be to do this:

nav li:first-child a {text-indent: -9999px;}

or also

nav li a.master {text-indent: -9999px;}

Upvotes: 1

Nikola R.
Nikola R.

Reputation: 1173

body > nav li {
          display: inline-block;
          vertical-align: middle;
        }
        body > nav a.master {
          display: block;
          height: 36px;
          font-size: 0;
          padding: 0;
        }

enter image description here

Upvotes: 2

Related Questions