I have the following tag with input text fields with labels
<div>
Start Date:
<input type="date" id="reportsStartDate">
End Date:
<input type="date" id="reportsEndDate">
</div>
and it looks like this
as you can see the labels for the text boxes are at the lower part of the text boxes. How do i set this so the labels are centered to the text boxes like below?
Vertical-align: middle
is needed. If your input is a display:inline-block
it works.
您可以向标签添加填充,将其与输入的高度对齐,因为您需要包括一个和内部的标签。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.