Image link hover style

They have: 121 posts

Joined: Aug 2008

I've implemented the following styling on links:

a:active, a:visited, a:link {
text-decoration:none;
color:#777676;
border-bottom:1px dashed #83c3D6;
}

a:hover {
text-decoration:none;
color:#777676;
border-bottom:1px dashed #83c3D6;
background:#FEF785;
}

What can I do to make sure this style isn't applied to links on images.

I've tried the following with no success

a img {
border-bottom:none;
background:none;
}

serpico

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

No, because the CSS is on the a tag, not the img. I think you'd probably want to put a class on your image links to fix this.

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

ah yes, took a minute to get it...

a .imglnk {
border-bottom:none;
background:none;
}

<a class="imglnk" href="http://"><img src="http://" alt="" /></a>

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.