Click to See Complete Forum and Search --> : Q: scroll area


riskEn8
02-27-2003, 05:37 PM
Okay, my question is this: Is it possible to have a small portion of a page have its own scroll bar? I believe I have seen it done. The thing is I DO NOT WANT TO USE FRAMES. Though I know it could be done that way. The effect I want is like a text area box (a form) but with text (some possibly being links) already in it, a background color of my choosing, and no way for the user to change the information as one could with a form.

Appreciate any input,
Nate

Jona
02-27-2003, 05:41 PM
You can't really put links in a textarea, you can just add stuff with CSS, but I doubt there's anyway even with Javascript to make a link in a textarea.

pyro
02-27-2003, 06:27 PM
Like the scrollable area found here? http://www.infinitypages.com/webdesign.php

riskEn8
02-28-2003, 10:17 AM
That is exactly the effect I want... what kind of scripting is used?

pyro
02-28-2003, 10:23 AM
It's easy, really. Just required one line in my CSS file.

<style type="text/css">
.main {
font-size: 14px;
font-family: Verdana;
color: black;
width:510px;
height:300px;
background-color: #eeeeee;
border: 1px solid #344170;
padding: 6px;
overflow: auto; /*This line sets the scrolling*/
}
</style>

<div class="main">
<P>The following text consists of a mock Latin which has been based upon
the average frequency of characters and word lengths of the English language
in order to reproduce a reasonably accurate overall visual impression.
Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy
eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.
<p>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor
*** soluta nobis eligend optio comque nihil quod a impedit anim id quod
maxim placeat facer possim omnis es voluptas assumenda est, omnis dolor
repellend. Temporem autem quinsud et aur office debit aut tum rerum necesit
atib saepe eveniet ut er repudiand sint et molestia non este recusand.</p>
<p>The following text consists of a mock Latin which has been based upon
the average frequency of characters and word lengths of the English language
in order to reproduce a reasonably accurate overall visual impression.
Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy
eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.</p>
<p>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor
*** soluta nobis eligend optio comque nihil quod a impedit anim id quod
maxim placeat facer possim omnis es voluptas assumenda est, omnis dolor
repellend. Temporem autem quinsud et aur office debit aut tum rerum necesit
atib saepe eveniet ut er repudiand sint et molestia non este recusand.<br>
</p>
</div>