Question: Can I make textarea larger (larger text)?

P

Peter Williams

Hi All,

I have a simple html page (see below), which uses some javascript and
contains a small textarea (4 rows by 5 cols). What I want to know is,
is there a way of making the text in the textarea appear larger???

Regards,
Peter W. :)))
Sandy Bay, Hobart, Tas, AU.

(delete silly boy to reply via email).


--- code follows ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<script language="JavaScript">
<!-- Begin animation ---
var frame_count=0;
var nl="\r\n";

function Animate()
{
document.animation.viewer.value = cartoon[frame_count];
if (cartoon[++frame_count]==null) frame_count = 0;
// Remove "//" from start next line to show it a frame at a
time.
// if(confirm('continue?'))
setTimeout("Animate()", 200); // Change number here to change
speed
}

var cartoon = new Array(
" o \r\n"+
"^|\\\r\n"+
" /\\\r\n",

" o \r\n"+
"^|^\r\n"+
" >\\\r\n" // more frames than this, obviously...
);// ---- End animation script ----->
</script>

<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<BODY text=white bgcolor=black onload=Animate()>
<FORM NAME=animation><center>
<TEXTAREA NAME=viewer ROWS=4 COLS=5></TEXTAREA>
</center></FORM>
</body>
</html>
--- end code ---
 
D

Dylan Parry

Using a pointed stick and some pebbles, Peter Williams scraped this into
the dirt:
is there a way of making the text in the textarea appear larger???

Yes. You can either add the attribute:

style="font-size: 1.2em;"

to the textarea element, substituting 1.2em for whatever number greater
than 1 that you wish, or by adding:

<style type="text/css">
textarea {
font-size: 1.2em;
}
</style>

to the <head> section of your page. Using the second method will make
the text in *all* textareas larger, whereas using the former will only
affect that one particular element.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top