[Wikipedia-l] Please help test new features

Richard Grevers lists at dramatic.co.nz
Wed Jul 2 20:29:06 UTC 2003


On 02 Jul 2003 21:46:00 +0200, Erik Moeller <erik_moeller at gmx.de> gave 
utterance to the following:

> Richard-
>> I think it's highly confusing having the edit section link above and to 
>> the
>> right of the section it refers to. Below and to the right would be the 
>> more
>> natural position
>
> I would like to have it displayed *right-aligned* with the section  
> heading, and that's how it looks in Mozilla. The HTML used is
>
> <div style="float:right;margin-left:5px;">[edit link]<div>
> <h2><a name="Anchor name">Page title</a></h2>

I just checked in Moz 1.4a, IE6 and Opera 7 - the edit link is definitely 
higher than the header in all three - if I have the link right at the 
bottom of the screen, the Heading is off the bottom of the screen. This 
makes the link look as though it relates to the section above it.
The following markup achieves what you were aiming for:

<div><small style="float:right;margin-left:5px;">[<a 
href="/w/wiki.phtml?title=This_one&amp;action=edit&amp;section=1" 
class='internal' title="This one">edit</a>]</small><H2 id="newcomers"> This 
is a very long heading that might clash with the float</H2></div>

i.e. transfer the float to the inline element small and make the heading a 
child of the div.
Notice that I've also replaced the <a name> element with an id on the 
header, which is much more efficient and avoids problems with headers 
accidentally inheriting styling intended for links in some browsers.

More efficient still would be
<div class="editheader"><small>[<a 
href="/w/wiki.phtml?title=This_one&amp;action=edit&amp;section=1" 
class='internal' title="This one">edit</a>]</small><H2 id="newcomers"> This 
is a very long heading that might clash with the float</H2></div>

and then you can define
.editheader small {float:right; margin-left:5px;}
and skins can do groovy things like
.editheader {outline:1px solid #ccc;}

Richard (really looking forward to the day when users can specify their own 
stylesheets, stored locally)

-- 
Richard Grevers
Love is the triumph of imagination over intelligence






More information about the Wikipedia-l mailing list