Don't underline image on hover
Moderator: General Moderators
Don't underline image on hover
Alright, on this site, take a look up at the FAQ, Search, Memberlist, etc. How come when you hover of the text, it underlines only the text? Why doesn't it underline the image as well? The reason I ask is because on my site when you hover over my menu items, both the icon and the text is underlined, and it's ugly.
I it works fine with me:
Are you using the text-decoration property?
Code: Select all
a.main {
text-decoration: none;
}
a.main:hover {
text-decoration: underline;
}
Code: Select all
<a href="#" class="main"><img src="http://google.com/images/logo.gif" width="20" border="0" />Text next to it</a>
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Code: Select all
a:hover img {
text-decoration: none;
}to pickle:
yea that's what I wanted to do, but unfortunately IE doesn't know how to display png images properly (which is what the icons are), so I have to use javascript to fix png images ( I really don't care if they are rendered wrong for those with javascript disabled... I can deal with that ) and it only works on <img> tags with a height and width attribute.
yea that's what I wanted to do, but unfortunately IE doesn't know how to display png images properly (which is what the icons are), so I have to use javascript to fix png images ( I really don't care if they are rendered wrong for those with javascript disabled... I can deal with that ) and it only works on <img> tags with a height and width attribute.
Interesting... I've been working on a jqPlugin called "pngies" which stands for "PNG Internet Explorer Support".nickvd wrote:Have you researched the iepngfix.htc solution? It works on almost any png, background image and whatnot.
But it doesn't support backgrounds and I'm still working on resize issues.
Links to the htc would be great though, whatever a .htc is. You could PM or post here if you'd like.
EDIT: How is it even possible to allow alpha trans pngs in IE6 for backgrounds? Atleast I don't know of any hack for this.
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact: