I want to have the label text on top of the input when using the wrapping method, i.e.
<label>
Label Text:
<input type="text">
</label>
The following post is using the label with the for
attribute and therefore the label and input elements are separated: Styling Form with Label above Inputs
But is it possible in the way I wrote above?
2
Answers
You could simply wrap the label in a div:
Yes it’s possible to show label on top of the input with the mentioned above html. Please check CSS :-
Let me know if it works for you or not.