Re: [CSS3] Content to appear twice

On Tue, 2 Dec 2003, Matthias P. Wuerfl wrote:
>
> As i understand CSS3 it will be possible to move elements with
> "move-to", but they won't be displayed "here". So they will appear only
> once - but sometimes they're needed twice.

How would you cope with the following case?:

   <applet src="some-plugin" id="foo"/>
   <div/>
   <div/>

...with:

   div { duplicate-the-element-here: 'foo'; }

...? (That's just an example CSS syntax, not a formal proposal.)

Basically, there are many cases where you just can't duplicate the
content. Plugins are one example, form controls another.

It also seems odd from a DOM point of view -- what's the offsetTop of a
<div> that is painted twice?


> - A menu (unordered list with links) can appear at the top of the page
> and at the end of the page. In HTML i'd like to have it only once since
> there is only one menu. Displaying it twice is a matter of presentation
> of the document on screen and should therefor be handled in CSS

Yeah, that can be a problem... you could include the header twice with
XInclude, or use a binding (XBL, HTC, or whatever the W3C or another
standards organisation decides on) to include it, and define the header
outside the markup. That may be semantically better anyway, since the
document navigation is not necessarily a part of the document itself in
many cases.


> - A header (Content of an <hn>-Element) in printed Documents is commonly
> repeatedly displayed in the head of the page (@page@top).

You can do that with fixed positioning or other print-specific techniques.


Cheers,
-- 
Ian Hickson                                      )\._.,--....,'``.    fL
U+1047E                                         /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 2 December 2003 09:32:13 UTC