+ 1
How to align textarea to center of the page?
9 odpowiedzi
+ 6
Probably your textarea is too wide that center alignment effect simply not visually observable, try to reduce the width, this is tested to align textarea in the middle of screen on Code Playground.
<!DOCTYPE html>
<html>
<head>
<title>Center the textarea</title>
</head>
<body>
<div align = "center">
<textarea placeholder="noticeboard" cols="25" rows="15">
</textarea>
<br />
<button formaction=stu.php>student</button>
<button formaction=fac.php>faculty</button>
</div>
</body>
</html>
+ 4
Try to wrap the textarea within a div with align attribute set to center, maybe something like this:
<div align="center">
<textarea>
Sample text
</textarea>
</div>
Hth, cmiiw
+ 4
@Charan Leo25, that's really too kind, but a simple thanks will do just fine for me :)
Cheers @All
+ 1
<center><textarea placeholder=noticeboard cols=100 rows= 15></textarea></center>
<button formaction=stu.php>student</button>
<button formaction=fac.php>faculty</button>
+ 1
iam working for a college project.
iam currently coding with pc of windows 7.
+ 1
thank u all
0
it does n't work
0
Not working. Only buttons are aligned center. textarea remains left.
0
Thanks for this