i am trying to make a radio button behave like button
here is my html
<div class="options">
<label><span class="label">options</span>
<abbr class="required" title="required">*</abbr>
</label>
<ul>
<li>
<input type="radio" value="option1" checked="checked" name="radio_option1" id="option1" class="checkout_field"> optionA
</li>
<li>
<input type="radio" value="option2" name="radio_option1" id="option2" class="checkout_field"> OptionB
</li>
<li>
<input type="radio" value="option3" name="radio_option1" id="option3" class="checkout_field"> OptionC
</li>
</ul>
</div>
and the css
.options ul {
list-style-type:none;
margin:25px 0 0 0;
padding:0;
}
.options li {
float:left;
margin:0 5px 0 0;
}
.options li {
padding:5px;
cursor:pointer;
-webkit-appearance: button;
/* WebKit */
-moz-appearance: button;
/* Mozilla */
-o-appearance: button;
/* Opera */
-ms-appearance: button;
/* Internet Explorer */
appearance: button;
/* CSS3 */
}
input[type=radio] {
display:none
}
if i set the display of the input to "in-line" its works but with display property set to "none" it does-not work.
please note that i cannot change the html markup above as its being generated somewhere else.
here is the codepen link for the same https://codepen.io/anon/pen/XRbQJO