On Wed, May 30, 2012 at 3:27 AM, Philippe Wittenbergh <e...@l-c-n.com> wrote: > > On May 30, 2012, at 2:51 AM, Paceaux wrote: > >> Did anyone have any thoughts on removing underline from generated content in >> the hover state for IE? >> >> I did some checking and it appears that the behavior occurs in all versions >> of IE? I'm guessing that this is default behavior for IE, then, to allow >> generated content to always inherit the hover state. > > It is not a hover problem; in IE, the underline is always propagated to the > generated content - even when the generated element is set to e.g. > display:inline-block. Older Gecko (at least Firefox 3.6) also did that. > > That is contrary to what the spec says: > http://www.w3.org/TR/CSS21/text.html#propdef-text-decoration > > Unfortunately, I didn't find a workaround for IE (for older Gecko, you > specify a background-color on the generated content and it would cover the > underline, but that doesn't work in IE. > > Philippe > -- > Philippe Wittenbergh > http://l-c-n.com/
Painting the underline with a background does not work in IE8, but what about a white outline that covers the underline? a{ text-decoration:none; } a:hover, a:focus, a:active{ text-decoration:underline; } a[href*="pdf"]:after{ display: inline-block; margin-left: 1ex; color: #333; content: " (PDF) "; text-decoration: none; outline: 2px solid white; /* paint it white, I'd hide that from none-IE-browsers */ line-height:0.9; /* to be adjusted */ } a[href*="pdf"]:hover:after{ text-decoration:none; } ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/