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

Oberholtzer,Stephen wrote:
(snip)
> 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 think this is mostly an implementation problem. As you said, you are 
faking frames. Once XFrames is a Recommendation and widely implemented, 
it should provide a simple solution.

 > 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; }

I suppose it would be better to have the root's margin affect the offset 
of anchor targets in a more logical manner. Setting a margin for the 
root should actually put a margin between the root and the viewport (the 
layer you use as header should therefore never be on top of anything 
else, it should be vertically above the body).
The target offset of anchors should therefore be calculated in relation 
to the root, not the viewport (which is how I assume it is done at the 
moment).

This could be a box model issue, but I'm not sure if this is an actual 
CSS problem or an XML one.

-ap

Received on Wednesday, 31 March 2004 09:11:50 UTC