Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A scrollable child window in web page

Status
Not open for further replies.

correro

Programmer
Nov 20, 2003
54
0
0
CN
I wish to have a child window in my web page, and child window can be scrolled down if there is much text in it.

I could use <textarea>, but it does not work if I put form elements in it (like <input>, <select>, etc.)

What HTML tag, or whatever, should I use to achieve that? Thank you!
 
You should add [tt]overflow: auto;[/tt] to a block level element (such as div) that has fixed width and height specified:
Code:
<div style="width: 100px; height: 100px; overflow: auto;">Text go here.</div>
For the final page, the inline style would be moved into a separate stylesheet.
 
Yes, that's what I was looking for. Thanks, Vragabond!

BTW, is it supported in all browsers and all versions? I know that some HTML syntax is supported in some browsers/versions but not some others.
 
No, it is not supported in older browsers with poor css implemenatition such as IE3, IE4, NN4 and such. I don't know about the rest of the old ones. It works however on IE5+, Geckos (Mozilla, FF, Netscape 6+), Opera, Safari, and basically all modern browsers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top