Image link hover style
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 posted this at 13:12 — 8th September 2008.
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 posted this at 03:03 — 9th September 2008.
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.