...

View Full Version : Centering Text in a TEXTAREA



jiapei_jen
05-11-2007, 06:17 PM
How to make the text that is typed in a TEXTAREA (with width and height specified) appear in the middle of it.

The text that I typed is left-aligned. Because I have wrap="on", every single line is left-aligned with no space in between the text and the left wall of the TEXTAREA. Please advise. Thank you.

coothead
05-11-2007, 06:24 PM
Hi there jiapei_jen,

try it like this...

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
textarea {
text-align:center;
}
</style>


</head>
<body>

<div>
<textarea row="10" cols="30"></textarea>
</div>

</body>
</html>
coothead



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum