W3C home > Mailing lists > Public > www-style@w3.org > March 2004

Re: Proposal: New attribute(s) or pseudoelement for documents with obscured regions

From: Phil Baines <phil@gnasp.com>
Date: Wed, 31 Mar 2004 21:56:58 +0100
Message-ID: <406B309A.4@gnasp.com>
To: "Oberholtzer,Stephen" <stephen.oberholtzer@freedompay.com>
Cc: www-style@w3.org
First, you said you were faking frames? why? if you plan on using frames 
in the future the anchor will not get obscured by the frame will it? no 
problem then.

If i am completely off the mark with the above statement, sorry. let me 
try again;

If the problem is that the anchor is getting obscured because of the top 
layer, maybe you could use an empty anchor tag instead and use relative 
positioning to change the whereabouts of it on the page. So, then it 
will not get obscured - or at least the content you want to see will not 
get obscured.

Use this css:

    a[name]{
        position:relative;
        top: -100px;
    }

    span.foo{
        color: red;
        font-weight: bold;
    }

And replace:

    <a name="foo">This is the anchor named 'foo'.</a>

With this:

    <a name="foo">&nbsp;</a>.

    <span class="foo">This is NEXT TO the anchor named 'foo'.</span>

I hope that works now. :)

If i am completly off the mark again; I bite.

Phil.


Oberholtzer,Stephen wrote:

>First, have a gander at http://www.oilcan.org/~stevie/fixedmenu_a3.html, 
>preferably with a recent version of a Gecko browser. (I used -moz-opacity
>to help demonstrate what's going on here.)
>
>The blue-backgrounded div is position: fixed, meant to simulate a frame
>(on a real site I'm designing, said div is:
>
><ul>
><li> Fully opaque (no -moz-opacity or anything)
><li> The container of a CSS-based dropdown menu much like
>the suckerfish dropdowns (article http://www.alistapart.com/articles/dropdowns/,
>example http://www.htmldog.com/articles/suckerfish/example/)
></ul>
>
>This page has two problems, stemming from the fact that our non-psychic browsers
>do not know our intent:
>
>1. At the top is a link saying 'Klik hier' that links to an anchor further down
>the page. Clicking it jumps to that anchor -- unfortunately, the anchor scrolls
>to the top of the viewport, where it is obscured beneath the fixed-position div.
>
>2. Pressing the spacebar (or pgdn, or doing some other action to scroll down one
>page length) scrolls by the height of the entire viewport, leaving the top part
>of the next page obscured beneath the fixed-position div.
>
>
>
>I propose either some sort of pseudo-element:
>
>/* inform the browser that the top 5em and bottom 6em of the page are obscured
> * and that <a href='#bar'> and page-level scrolling should account for this
> */
>
>body::foo { margin-top: 5em; margin-bottom: 6em; }
>
>Or a group of attributes:
>
>body { quux-top: 5em; quux-bottom: 6em; }
>
>
>
>Ideas, anyone?
>
>  
>
Received on Wednesday, 31 March 2004 16:01:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:27 GMT