Help - Search - Members - Calendar
Full Version: Scrollbox in Div?
Forums > Resource Center > Webmasters' Corner > Resolved Topics
cait7283
Is it possible to just put a scroll box in a div instead of having the auto flow?
divergent
The purpose to having the scroll is because there is content that does not show in the div, I mean, if the content is all shown, what would be the point of the scroll bar? Maybe you could post a picture if I'm not exactly getting what you are saying.
Mulder
to have a scrolling div, all you need to do is assign a height to it.

ex:
CODE
<style type='text/css'>
#div {
position: absolute;
width: 400px;
height: 400px;
left: ___;
top: ___;}
</style>

<div id="div">blah blah</div>


Once the content gets bigger than the assigned height (400px) it will scroll
cait7283
http://i15.photobucket.com/albums/a398/cai...bjnbkjfnvfr.jpg

Ok, I don't know if it's possible but I was wanting to put a scroll box under the comment box so you would have to keep scroll to read what i put in there. Is it possible in any way?
Mulder
thats just a textarea

CODE
<textarea>blah</textarea>


you can edit it with css:
CODE
<style type='text/css'>
textarea {
font:;}
</style>
cait7283
Thxs that worked, but can you center the words, and use bold and underlines with the text?
Mulder
I don't think you can use <b> or <u> in textareas..

as for centering:

CODE
<style type='text/css'>
input, textarea {
text-align: center;}
</style>
sarahwynne
QUOTE(Mulder @ Jun 3 2007, 02:09 PM) *
I don't think you can use <b> or <u> in textareas..

as for centering:

CODE
<style type='text/css'>
input, textarea {
text-align: center;}
</style>


No codes will have any effect if they're placed within a textarea. Those are often used for sample scripts and codes, because they won't affect the rest of the page.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.