When searching on any of the SO family sites, search terms are highlighted in the results with a background color. However, this tends to change result links' style to have no 'underlined' style on hover.

Was that intentional?

Example image:

alt text

2 Answers 2


It's intentional by way of CSS working its styles in hierarchy.

Highlighted word in this case has a CSS style applied to it that comes ahead of the style that is applied to the line as a whole.

So in effect it kind of ignores what's going on in the background because the style that's applied to it takes the cake and the higher order of presentation value.

  • 1
    But still, I think that highlighting shoudn't break link-specific underlined style.
    – Regent
    Feb 23, 2010 at 14:50
  • Moreover, like described in this question, the underlining does appear in Opera (and perhaps also in IE >7, but I can't test this at the moment) May 10, 2010 at 17:19

This no longer happens, never too late for a bugfix eh?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .