I'm working on incorporating two radio buttons in a form. I have successfully added text inside the buttons and customized them using labels. However, despite applying text-align=center;
, the text remains at the top of the button instead of being vertically and horizontally aligned in the middle. It is currently aligned horizontally.
View image of the current state
Below is the code:
.buttonsform #locheck{
position:absolute;
top:0px;
left:0px;
display:inline-block;
border-radius: 40px;
width: 190.47px;
height: 45.96px;
text-align: center;
border: 1px solid #333333;
font-family:Montserrat;
font-style: normal;
font-weight:500;
font-size: 18.192px;
line-height:22px;
text-transform: uppercase;
color:#333333;
cursor:pointer;
}
.buttonsform #lpcheck{
position:absolute;
top:0px;
right:0px;
border-radius: 40px;
width: 190.47px;
height: 45.96px;
vertical-align: middle;
text-align: center;
border: 1px solid #333333;
font-family:Montserrat;
font-style: normal;
font-weight:500;
font-size: 18.192px;
line-height:22px;
text-transform: uppercase;
color:#333333;
cursor:pointer;
}
<div class="buttonsform">
<input type="radio" name="dentistry" id="ocheck">
<input type="radio" name="podiatry" id="pcheck">
<label for="ocheck" id="locheck">Dentistry</label>
<label for="pcheck" id="lpcheck">Podiatry</label>
</div>