0

check this simple code: http://jsfiddle.net/DECPY/ . As you can see when you hover the menu item a gray backgroud apear, but, no behind the menu icon. How can i put the color backgroud behind the image when the mouse pass over?

This is an image that explains evrythink: enter image description here

2 Answers 2

1

I edited your code a little. I moved home-ico class to a link. And changed appropriate styles. See it here.

Sign up to request clarification or add additional context in comments.

Comments

1

You can do the folowing:

replace

div#vertmenu ul li.home-ico {...}

with:

.home-ico img {
    margin: 0 5px -2px 0;
}

And change yor html like this:

<div id="vertmenu"> 
    <ul>
        <li class="home-ico">
            <a href="#" tabindex="1">
                <img border="0" src="http://www.benyboatti.com/images/home-icon.png"/>
                Home
            </a>
        </li>
    </ul>
</div>

Note: it works even in IE6. jsFiddle

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.