CSS3 ::selection selector not working properly on anchor tags

Viewed 1193

I am using the CSS3 ::section Selector like this

::selection{
    color:red;
    background-color:pink;

}
::-moz-selection {
    color:red;
    background-color:pink;

}

So when some element is selected it should change its color to red and the background to pink.

It works as expected for everything other than the Anchor tag <a>.

When an anchor text is selected, it applies the style to the link text but not on the line beneath the anchor text.

JSFiddle: http://jsfiddle.net/GcBT2/1/

So how can we apply the style to the underline also?

PS: Browsers tested: chrome 31 and firefox 25.0.1

2 Answers
Related