Skip to content

Instantly share code, notes, and snippets.

@weldyss
Forked from anonymous/css
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save weldyss/c0cc20ffed45bf05885e to your computer and use it in GitHub Desktop.

Select an option

Save weldyss/c0cc20ffed45bf05885e to your computer and use it in GitHub Desktop.
radio-button replacement
<div class="variations">
<input type="radio" name="attribute_pa_tamanho" id="p" value="p">
<label for="p" class="attribute_pa_tamanho">p</label>
</div>
.variations label {
display: inline-block;
cursor: pointer;
position: relative;
padding: 5px 7px;
margin-right: 15px;
font-size: 13px;
color:#000;
text-align: center;
}
.variations label:hover{
background:#000;
color: #fff;
}
.variations input[type=radio] {
display: none;
}
.variations input[type=radio]:checked + label {
background:#000;
color: #fff;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment