On 2/2/06 11:29 AM, "Rene Rivera" <[EMAIL PROTECTED]> wrote:
> David Abrahams wrote: [SNIP] >> Issues: >> >> In >> http://boost.redshift-software.com/doc/release/libs/python/doc/building.html, >> why do the section headings highlight on mouse-over, yet do nothing >> when clicked? Combined with the underlines, that's very confusing! > > It's a side effect of your habit of wrapping the anchor links around the > headings instead of putting the empty anchor link in front of the title. > I.e. doing: > > <h4><a href="#x">X</a></h4> > > Instead of: > > <h4><a href="#x"></a>X</h4> > > Without any additional styling context I can't use CSS to remove the > link effect from those :-( [TRUNCATE] I don't think you mean the "href" attribute here[1], you really mean the "name" attribute[2]: //======================================================================== <h4><a name="x">X</a></h4> <h4><a name="x"></a>X</h4> //======================================================================== To see where the highlight comes from, let's look at the CSS (at the same part where I complained about in another message): //======================================================================== On 1/31/06 7:31 PM, "Eric Niebler" <[EMAIL PROTECTED]> wrote: > /* Links */ > a > { > text-decoration: none; /* no underline */ > } > > a:hover > { > text-decoration: underline; > } //======================================================================== This CSS applies to all anchors, no matter whether they are a link source ("href") or a link destination ("name")[3]. However, the author really just wanted it for link sources, but we have to live with it for any anchor. (I guess CSS cannot specify the look of a tag ["a"] where a certain attribute ["href"] is, or is not, present.) The proper solution is _neither_ of these! Use the "id" attribute DIRECTLY on the tag you want as the link destination: //======================================================================== <h4 id="x">X</h4> //======================================================================== Then a "href" attribute of "whatever.html#x" will jump to that "h4" tag. Using the "id" attribute in this fashion makes the "a:name" tag & attribute setup obsolete. That's why HTML uses the same namespace for "id" and "name" values. Since there is no explicit anchor, the CSS setting for the "a" tag won't get in the way. Long ago I tried to modernize the documentation for <boost/operators.hpp> with HTML 4, and I replaced all the "a:name" flags with "id" attributes. People back then complained that HTML-4 was too advanced for that time and I took out those replacements (manually). Since HTML 4 isn't advanced anymore and (AFAIK) CSS use needs HTML 4, or XHTML, we should switch back to the "id" attribute philosophy and remove the "a:name" flags as appropriate. [1] If you really meant the "href" attribute, you would be in trouble for the second style, since the click area is zero! [2] The "#" part of a location indicates that it's a subsection of an HTML document. Therefore it's only for "href" attributes and not "name" attributes. [3] Technically, an anchor can be both a link source and destination! -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Boost-docs mailing list [email protected] Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs
