[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#308988: bad usage of anchor tags leads to ugly css hover effects



Package: www.debian.org

Pages which have a table of contents like
http://www.debian.org/MailingLists/ or http://www.debian.org/support
use the anchor tag like e.g. in <h2><a name="intro"
id="intro">Introduction</a></h2>, i.e. the <a> element's content is
the title itself.

But since debian.css defines the following rules for <a> tags:

a:visited { color: #800080; }
a:link { color: #0000FF; }
a:active { color: #FF0000; }
a:hover {   color: #F000FF; }

this leads to the effect, that, whenever one hovers over the title, it
will change its color. This is not only ugly but also misleading,
since the color change should indicate a hyperlink, but it's a plain
title which does not link to anywhere, but is instead being linked TO.

This could be solved by either using the anchor tag as follows:

<h2><a name="intro" id="intro"/>Introduction</h2>

or by changing the css rules for <a> to:

a[href]:visited { color: #800080; }
a[href]:link { color: #0000FF; }
a[href]:active { color: #FF0000; }
a[href]:hover {   color: #F000FF; }

If this effect was intentional however, forget this report.

-- 
Best wishes,
Andi



Reply to: