Previous Message
Next Message

removing underlines from images placed between anchor tags

Sent by Philippe Wittenbergh on 27 March 2006 05:05

On Mar 27, 2006, at 12:45 PM, pablo / silvasonic wrote:

> my name is pablo silva and this is my first post to the list.

Welcome here

> ....
> the actual site will be sitting at: but
> for now i'm playing with the main CSS here:
> temp/sandbox/css_test_00.html (the actual CSS is right on the file
> for the time being). so here's my question:
> how do i get rid of the underlining below the little calendar / clock
> icon on hover? i've tried of sorts of rules, but the basic idea is
> that an image, within the class .post_meta and placed between anchor
> tags, should not have a bottom border (or even 'text-decoration').
> i'd really appreciate any tips / pointers on how to control this.

That is a question that often comes up on this list.

That underline (or border in your case) comes from these rules

..post_meta a:hover, .post_title a:active {
	border-bottom-width: 1px;
	border-bottom-style: solid;
	border-bottom-color: #000;
	text-decoration: none;
	color: #333;

To prevent the border to show up under the image, you'll have to add  
a class to the link that wraps around the image
<a href="" class="myclass"><img src="icon.gif"...></a>
and style that class
..post_meta a.myclass:hover {border:none}

The border is part of the link declaration, the link wraps around the  
image tag.

Philippe Wittenbergh

css-discuss [EMAIL-REMOVED]]
IE7b2 testing hub --
List wiki/FAQ --
Supported by --
Previous Message
Next Message

Message thread: