Why are my text boxes and text areas not aligned when they are the same width?
Here's the simplest example:
<textarea id="text_area" name="text_area" style="width:280px">
</textarea>
<input id="text_field" name="text_field" style="width:280px" type="text" />
+2
klochner
source
to share
2 answers
Try setting padding and margin values to 0px.
+3
Ólafur Waage
source
to share
I also needed to set the border property. Adding the following to both elements:
border:1px solid #ccc;
+2
klochner
source
to share