...

View Full Version : a:hover img



Stephen
12-27-2005, 09:51 PM
'm trying to over ride a hover problem now. In my content div on one page I have text and links, so the style page has something like



#content a:hover {
color: #FFA200;
text-decoration: none;
background: none;
border-bottom: 2px solid #FFA200;
}

ok, but the links page, uses the same style, so the affiliate buttons which also use <a> inherit that style, now I have tried to use #content a:hover img { border:0; but it doesn't appear to be over riding the border-bottom hover effect. Is there any way to over come this other than having the links page load up a completly seperate style sheet?

Graft-Creative
12-27-2005, 10:53 PM
Hi Stephen,

If you embed the specific styles for the links page within the < head > of the links page, that should solve the problem, as embedded styles should override linked styles:



<head>
<!-- all your usual head stuff -->
<style type="text/css">
a img { border: none; }
</style>
</head>


Give it a try,

Gary

Stephen
12-27-2005, 11:18 PM
Thanks for your reply,

I tried it out and added it in to the head of the page, however it does not override the other style.

Graft-Creative
12-27-2005, 11:30 PM
ah....can you post your full code, or even better a link?

Gary

Stephen
12-27-2005, 11:54 PM
Sure.

content page (http://www.xtopic.net/sd)

links page (http://www.xtopic.net/sd/links.html)

style sheet (http://www.xtopic.net/sd/style.css)

thanks,

harbingerOTV
12-28-2005, 04:26 AM
<style type="text/css">
#links .links a {
border: 0;
font-size: 0;
border-bottom: 0;
}
#links .links a:hover {
border: 0;
}
#links .links a img {
border: 0;
}
</style>


try that to replace what Gary wrote. You might run into conflicts if you out any text links inside the <p class="links"> .

Stephen
12-28-2005, 05:09 AM
Ah, it works. Thanks! I was so close too.. :o



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum