By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,785 Members | 1,072 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,785 IT Pros & Developers. It's quick & easy.

scrolling within div

P: n/a
This is a follow-up to an earlier posting - this time with sample code.

In the code below, the jump within the div causes movement within the
div and as well withing the page as a whole. I am looking for a way to
restrict movement, triggered by the jump, to the area within the div
only.

Here is the code.

<html>
<head>
<style type="text/css">
..sectionhead {
text-align: left;
background: #EBEBEB;
height: 7.25em;
width: 100%;
border-style:ridge;
border-width:thin;
border-color:grey;
float: left;
margin-left:0px;
margin-right:0px;
overflow-y: auto;
color: black;
}

</style>
</head>
<body>
blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>bl ah<br>
blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>bl ah<br>
<div class="sectionhead">
<a href="#test">go to "test"</a><br>
text in div<br>text in div<br>text in div<br>text in div<br>
<a name="test"></a>
more text in div<br>more text in div<br>more text in div<br>
more text in div<br>more text in div<br>more text in div<br>
blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>bl ah<br>
</div>
blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>bl ah<br>blah<br>
blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>bl ah<br>blah<br>
blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>bl ah<br>blah<br>
blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>bl ah<br>blah<br>
</html>

------------

Stan

Jan 14 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.