View Full Version : Scrolling text area
ltempest
10-17-2002, 11:18 AM
Hello everyone,
I've searched the web looking for a tutorial/sample script that would allow me to insert a text box onto my web page and allow the user to scroll the text to reveal the rest of the story. I've tried using the <textarea> tag but this does not allow me to use stylesheet tags within the text. Does anyone know of a resource I could use?
Thanks :-)
LEE
Roelf
10-17-2002, 11:27 AM
you could use an iframe and place the text in a separate page. then you have full control over the layout of the text.
http://www.devguru.com/Technologies/html/quickref/html_iframe.html
You can also use a div with a specified size and the overflow attribute set to scroll
http://www.devguru.com/Technologies/css/quickref/css_overflow.html
flash
10-17-2002, 12:02 PM
Hey.
Im not sure if this is exactly what you are after, but check it out, it looks cool :p
<textarea rows="11" name="textarea1" cols="68" style="border: 1px solid; border-color: #000000; background-color: #FFFFFF; font-family: Arial; font-size: 12px; color: #000000;">Text inserted here</textarea>
You can use this same code for a button:
<input type="submit" value="Submit" style="border: 1px solid; border-color: #000000; background-color: #FFFFFF; font-family: Arial; font-size: 12px; color: #000000;">
Hope this helps!
Flash
chrismiceli
10-17-2002, 01:22 PM
roelf said you can use a <div> tag to do what you want, i think it is something like this
<div style="border: 1px solid; border-color: #000000; background-color: #FFFFFF; font-family: Arial; font-size: 12px; color: #000000;">
<textarea ros="11" name="textarea1" cols="68">text inserted here
Roelf
10-17-2002, 01:46 PM
I meant like:
<html>
<head>
<title></title>
<style type="text/css">
.inner {
width: 500px;
}
.outer {
width: 150px;
height: 150px;
overflow: scroll;
}
</style>
</head>
<body>
<div class="outer">
<div class="inner">
Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
</div>
</div>
</body>
</html>
chrismiceli
10-17-2002, 01:51 PM
mine works just fine though.
Roelf
10-17-2002, 01:55 PM
try formatting textparts in your textarea :D
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.