This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > January 2007 > scrolling within div





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author scrolling within div
stan

2007-01-27, 11:02 pm

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>blah<br>
blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>blah<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>blah<br>
</div>
blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>
blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>
blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>
blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>blah<br>
</html>

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

Stan

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews