Created
May 19, 2015 22:10
-
-
Save nadavoid/ab40728704cda1678c93 to your computer and use it in GitHub Desktop.
Radios as buttons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Radio Buttons */ | |
input[type="radio"] { | |
display: none; | |
} | |
input[type="radio"] + label { | |
display: inline-block; | |
padding: 20px 30px; | |
background-color: teal; | |
color: white; | |
border-radius: 4px; | |
font-size: 20px; | |
font-weight: 600; | |
} | |
input[type="radio"]:checked + label { | |
background-color: black; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<input type="radio" id="amount-250" name="submitted[amount]" value="250" checked="checked"> | |
<label class="option" for="amount-250">$250</label> | |
</div> | |
<div> | |
<input type="radio" id="amount-100" name="submitted[amount]" value="100"> | |
<label class="option" for="amount-100">$100</label> | |
</div> | |
<div> | |
<input type="radio" id="amount-50" name="submitted[amount]" value="50"> | |
<label class="option" for="amount-50">$50</label> | |
</div> | |
<div> | |
<input type="radio" id="amount-25" name="submitted[amount]" value="25"> | |
<label class="option" for="amount-25">$25</label> | |
</div> | |
<div> | |
<input type="radio" id="amount-other" name="submitted[amount]" value="other"> | |
<label class="option" for="amount-other">Other</label> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment