I'm trying to do this and have got the code mostly working, except for the fact that it only ever selects one button, and won't allow selection of the other button...
The code is:
.radio-toolbar
%label{:for => "test_year_group_1"} AS
%input#test_year_group_1{:name => "test[year_group]", :type => "radio", :value => "1"}
%label{:for => "test_year_group_2"} A2
%input#test_year_group_2{:name => "test[year_group]", :type => "radio", :value => "2"}
and the css:
.radio-toolbar input[type="radio"] {
display: none;
margin: 10px;
}
.radio-toolbar label {
display: inline-block;
background-color: transparent;
border-style: solid;
border-radius: 8px;
border-width: 1px;
border-color: white;
padding: 8px 60px;
color: white;
margin-left: 20px;
margin-right: 20px;
}
.radio-toolbar input[type="radio"]:checked + label {
background-color: white;
color: gray;
}
But it only ever selects the A2 button, even when I click on the AS button...does anyone know why?