Take the 2-minute tour ×  Forgive me for asking such a simple
question, I'm new to both HTML and CSS. Is there an easy way to
center a textarea? I figured I'd just try using      margin-
left: auto;     margin-right: auto;  but it (obviously?) didn't
work.  Help would be much appreciated :-)  share|improve this
question  4 Answers 4  up vote 35 down vote accepted  The
margins won't affect the textarea because it is not a block
level element, but you can make it display block if you like:
display: block;     margin-left: auto;     margin-right: auto;
before and after  By default, textareas are display: inline,
which is why you can put them side-by-side easily, and why the
text-align: center answers work too.  share|improve this answer
This is what I'm using now, do you know if there's anything bad
about it (as it sounds too easy to be true/good ;-) )? –  Chris
Aug 26 '10 at 22:48 Nope, I don't know of any downsides. – 
Douglas Aug 26 '10 at 22:50 One downside is when textarea is
resized, (by dragging resi