I'm programming two radio buttons for a form. For this buttons, I managed to include text inside and personalize them by using labels. However, when text is included (and although text-align=center;
is added) it keeps at the top of the button, instead of aligning both vertically and horizontally in the middle of the button. It is aligned horizontally.
Here 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="odontologia" id="ocheck">
<input type="radio" name="podologia" id="pcheck">
<label for="ocheck" id="locheck">Odonotología</label>
<label for="pcheck" id="lpcheck">Podología</label>
</div>