css: scrolling divs and anchors

by Collette McNeill <collette(at)mlwebworks.com>

 Date:  Mon, 27 Oct 2003 09:07:49 -0800
 To:  hwg-techniques(at)mail.hwg.org
  todo: View Thread, Original
Hello List,

I've used a scrolling div to display content. I want to use anchors to 
allow users to skip around within that content, but the page behaves 
unexpectedly.

Wanna see?
Click on "calculators" when you reach this page:
http://205.158.168.102/020.shtml
And then click the link "mortgage calculators".

Does anyone know what's going on here?

The scrolling div is defined thusly in an external style sheet:
.Content {
         font-size:13px;
         font-family:"Trebuchet MS", Times New Roman;
         color:#FFFFFF;
         position: absolute;
         top: 126px;
         visibility: hidden;
         display: block;
         background-image:url("fade-dkblue.gif");
      border:1px solid #333333;
         padding: 4px 8px 4px 8px;
         background-attachment:fixed;
         }
and later, based on output by a sniffer, scrolling div gets a scrollbar in 
the document header
if (is.ns) {
     document.write('<.STYLE type="text/css">.Content {overflow: 
-moz-scrollbars-vertical;}<./style>');
}
else if (is.ieX || is.ie5 || is.ie4) {
         document.write('<.STYLE type="text/css">.Content {overflow-Y: 
scroll;}<./style>');

}

In early, buggy iterations of this page i #COULD# move around the scrolling 
div, but i linked to the anchor from OUTSIDE of the div. I must have FIXED 
that.  This time i'm trying to move around within the section. I might just 
break this single section into several...

Thanks in advance,
Collette

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA