I am facing an issue with aligning multiple labels and textareas together. Currently, they line up like this:
__________________
| |
| |
Label:|__________________|
However, I want them to appear as follows:
__________________
| |
Label:| |
|__________________|
While there are solutions available for similar problems, none of them address the specific scenario of having multiple labels and textareas grouped together. I attempted to implement a solution using CSS:
CSS:
.label_textarea {
vertical-align: middle;
}
HTML:
<p class="label_textarea">
<label>Label for textarea</label>
<textarea rows="5">Textarea</textarea>
</p>
Unfortunately, this approach did not have any effect on the layout. Additionally, the number of label-textarea combinations varies each time, making it difficult to use a fixed solution.
What steps should I take to achieve the desired layout outcome?