Re: Targeting to <DIV> (or other ids)

David Perrell (davidp@earthlink.net)
Wed, 26 Nov 1997 11:00:23 -0800


From: "David Perrell" <davidp@earthlink.net>
To: <www-html@w3.org>
Date: Wed, 26 Nov 1997 11:00:23 -0800
Message-ID: <01bcfa9d$8ccbb0a0$3b8cd9cf@davidp>
Subject: Re: Targeting to <DIV> (or other ids)

Andrew n marshall wrote:

>Something that I just realized, thanks to my "<DIV> as Frames" example:
>
>With CSS-2's overflow:scroll there should be a way to scroll to a
>particular section of the enclosed content.  In frames, this would be done
>with the 'TARGET='.  Currently this refers to Frame names.  I recommend we
>extend this to include id's by preceding the value by a '#'.  For example:
>
><DIV id='sidebar'>
>   <A href='#sect2' target='#main'>Section 2</A>
> ...

Why the complication? In your example document, this works in IE:

  <DIV id='sidebar'>
     <A href='#sect2'>Section 2</A>
  </DIV>
  <DIV id='main'>
     . . .
     <H1 id='sect2'>Section Two</H2>
  </DIV>

David Perrell