You are here: Re: [CSS] How to combine anchor tags w/o underlining images on hover « HTML « IT news, forums, messages
Re: [CSS] How to combine anchor tags w/o underlining images on hover

Posted by DC on 01/01/06 05:13

Rob McAninch wrote:
> DC>:

>> Same css for both cases. In case #1 (shared anchor tag), hover causes img to
>> be underlined along with the link text. Ugly. However, in case #2, img not
>> underlined on hover.

>> Why?

> Hm, I don't get an underline in case 1. But the underline may not be
> visible with the image border present. You could turn off the border
> for the image, however the image will no longer be distinguished as
> a link.

> Or try styling, A:hover IMG { } in some manner.

Okay...

<clickety>

This works:

a:hover img {
text-decoration:none;
}

....however, it apparently cannot co-exist with this:

a:hover {
color:#E39243;
text-decoration:underline;
}


FWIW, elsewhere in my stylesheet is this:

/******* images *******/

img {
border:none;
}


Basically, I have both text and an img inside a single anchor tag and I
want the hover to cause the text link to be underlined but to not affect
the img link. I'd like to not have to use two anchor tags.

Please be gentle -- I'm just getting my feet wet again after a 2+ year
hiatus. }:O)


--
DC Linux RU #1000111011000111001

The word 'politics' is derived from the word 'poly', meaning 'many'
and the word 'ticks', meaning 'blood sucking parasites'.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация