The vertical-align
CSS property doesn’t the desired effect, whether on the <form>
or <input>
tag.
Code:
<form style="vertical-align: center;">
<input type="button" value="trial" />
<textarea cols="80" rows="17"></textarea>
</form>
The vertical-align
CSS property doesn’t the desired effect, whether on the <form>
or <input>
tag.
Code:
<form style="vertical-align: center;">
<input type="button" value="trial" />
<textarea cols="80" rows="17"></textarea>
</form>
3
Answers
Attribute vertical-align does not accept the value of center. You should use a value of middle instead.
Are you attempting to position the "trial" button to the left and middle of the textarea? If so, try this:
vertical-align
doesn’t acceptcenter
as a value but rathermiddle
, and it centers elements vertically.justify-*
likejustify-self
,justify-items
, orjustify-content
center elements horizontally (it acceptscenter
as value notmiddle
) so depending on the desired effect, you can center your elements.