1

I have social bar on my website which indcludes facebook, twitter, google+ and rss.

It looks like this

enter image description here

On mouse hover, i want the circle around image to change color to blue. Somehow i always end up failing and the whole background changes to blue.

MY HTML CODE

<div class="social-top-nav">
    <ul>
        <li><a href="#"><img src="images/facebook.png" title="facebook" /></a></li>
        <li><a href="#"><img src="images/twitter.png" title="twitter" /></a></li>
        <li><a href="#"><img src="images/google.png" title="google+" /></a></li>
        <li><a href="#"><img src="images/feed.png" title="rss" /></a></li>
    </ul>
</div>

My CSS code

.social-top-nav{
    float:right;
    margin-top: 11px;
}

.social-top-nav ul li{
    display:inline-block;
}
.social-top-nav ul li a{
    display:block;
}

.social-top-nav ul li a img:hover{
    opacity: 0.8;
    -moz-box-shadow: 0 0 10px #ccc; 
    -webkit-box-shadow: 0 0 10px #ccc; 
    box-shadow: 0 0 10px #ccc; 
}

Can you guys help me fix the code? I'll appreciate any input.

knitevision

enter image description here

3
  • Can you share a Fiddle? Commented Apr 7, 2015 at 11:04
  • create a demo of your stuff Commented Apr 7, 2015 at 11:11
  • create a demo. this code is not enough. Commented Apr 7, 2015 at 11:20

2 Answers 2

2

you can't change the color of the circle (since it's part of the image)

but you can :

1 - add a css border circle (and then change the color):

border: 1px solid #ccc;
border-radius: 50%;

2 - try to replace your images with Font Icons

3 - use webkit-filter (this won't solve your problem, I'm posting just in case)

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

Comments

0

Try to this css

.social-top-nav:hover {
  color:blue;
 }

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.