By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,062 Members | 1,374 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,062 IT Pros & Developers. It's quick & easy.

align a textarea box to the right of the page

P: 1
I don't know how to right align a textarea box. I can use the center tag and the textarea box centers, but when I use the align=right attribute, the table stays at the left. How do I right align a textarea box?
Oct 10 '06 #1
Share this Question
Share on Google+
7 Replies


kestrel
Expert 100+
P: 1,071
you'd have to put the <textarea> tag into a <p> tag.

Expand|Select|Wrap|Line Numbers
  1. <p align="right"><textarea></textarea></p>
that works perfectly


hope this helps!

Devin Keogh
TheJetPage.com
Oct 10 '06 #2

drhowarddrfine
Expert 5K+
P: 7,435
Since all of that was deprecated years ago it would be better to use CSS and do this:
Expand|Select|Wrap|Line Numbers
  1. <textarea style="float:right">hello</textarea>
Oct 11 '06 #3

kestrel
Expert 100+
P: 1,071
yeah thats better, disregard my first post
Oct 11 '06 #4

P: 22
you can try this code i hope so it will help for you:

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <title>Right the textarea</title>
  5.     </head>
  6.     <body>
  7.     <div align = "right">
  8.     <textarea placeholder="noticeboard" cols="25" rows="15">
  9.  
  10.     </textarea> <br />
  11.     </div>
  12.     </body>
  13. </html>
Apr 1 '19 #5

gits
Expert Mod 5K+
P: 5,330
thats really an old thread and the css solution shown by drhowarddrfine above is much preferable
Apr 1 '19 #6

P: 18
Try to this Style for align right
Expand|Select|Wrap|Line Numbers
  1. <textarea style="float: right;">Right Textarea</textarea>
Jun 14 '19 #7

gits
Expert Mod 5K+
P: 5,330
yea - that solution was already provided in post #3 in 2011.
Jun 14 '19 #8

Post your reply

Sign in to post your reply or Sign up for a free account.