On Tue, 09 Feb 2010, Julian Foad wrote:
> * A very neat solution: a little "link to this section" symbol after
> each heading. I saw a web site that provided links to the individual
> section headings by popping up a little symbol (the paragraph marker
> symbol which looks like a P with a double-stroked vertical line) just at
> the end of the section heading text, only when the mouse hovered over
> the heading text. The symbol was a link to the full URL of that section,
> so it could be copied, plus a "title" attribute of some kind.
I have also seen that sort of thing, but can't find an example now. I
did find some Python language documentation that does something similar
except it displays the paragraph symbol permanently.
Here's an attempt at an implementation.
/* CSS */
/*
* Hide class="sectionlink", except when an enclosing heading
* has the :hover property.
*/
.sectionlink { display: none; }
.heading:hover .sectionlink { display: inline; }
/* HTML */
<div id="foo" class="container">
<h1 class="heading">This is a heading
<a class="sectionlink" href="#foo"
title="Link to this section">[[paragraph symbol]]</a>
</h1>
<p class="content">Text.</p>
</div>
--apb (Alan Barrett)
Received on 2010-02-09 16:56:28 CET