Vertical Align text in a Label

前端 未结 14 1648
攒了一身酷
攒了一身酷 2021-02-06 20:27

I have been asked to vertically align the text in the labels for the fields in a form but I don\'t understand why they are not moving. I have tried putting in-line styles using

14条回答
  •  再見小時候
    2021-02-06 21:08

    I came across this trying to add labels o some vertical radio boxes. I had to do this:

    <%: Html.RadioButton("RadioGroup1", "Yes") %>
    <%: Html.RadioButton("RadioGroup1", "No") %>
    <%: Html.RadioButton("RadioGroup1", "Maybe") %>

    This gets them to display properly, where the label is centered on the radio button, though I had to increment the top padding with each line, as you can see. The code isn't pretty, but the result is.

提交回复
热议问题