[pmwiki-users] nested divs

Patrick R. Michaud pmichaud at pobox.com
Mon Feb 6 11:37:24 CST 2006


On Mon, Feb 06, 2006 at 05:27:36PM +0000, Hans wrote:
> Monday, February 6, 2006, 4:33:20 PM, Patrick wrote:
> > Part of the reason I chose >>div<< was because it would be a
> > convenient lever into nested divs, as in
> >    >>div<<
> >    >>>nested div<<<
> >    >>>nested div<<<
> >    >>outer div<<
> >    >><<
> 
> interesting, but if we ever get to nested divs i think they would need
> to work without such indicators as to what the nesting level is.
> I should be able to write for instance to create a floating right bar
> 
> >>rfloat width=200px<<
> (:include RightBar:)
> >><<
> 
> and be able to have divs in RightBar, without needing to know what
> level they might end up in.
> 
> What annoys me about HTML <div> tags is the difficulty in seeing where
> exactly one div ends. Could the ending div markup not carry an indicator as
> to which opening div markup it belongs to? Like an id attribute? Then
> we won't need to specify levels.

Then the author must write explicit closing tags for each named div -- 
there cannot be an implicit close.  

Still, it would be really cool if we could come up with a way of
identifying divs.  Then a single closing tag or repeat of the div with
the same identifier could say "close all of the open divs (and tables?) 
since the div of the same name was started".  (Note that this somewhat
excludes the use of the id= attribute for this, since id= values have
to be unique on a page.  OTOH, we could follow the anchor convention
and simply have PmWiki generate an id= attribute only the first time
it's encountered.)

Pm




More information about the pmwiki-users mailing list