Opa,
I have a radio butt that via css are exchanged for color.
<div class="radio-cores">
<input type="radio" name="cor" value="1" />
<label class="product-color-blue"></label>
<input type="radio" name="cor" value="2" />
<label class="product-color-grey"></label>
<input type="radio" name="cor" value="3" />
<label class="product-color-red"></label>
<input type="radio" name="cor" value="4" />
<label class="product-color-green"></label>
</div>
The CSs
.radio-cores input[type="radio"] {
display: none;
}
.radio-cores label {
display: inline-block;
color:#fff;
padding: 4px 11px;
font-family: Arial;
font-size: 16px;
cursor: pointer;
margin:3px;
border:1px solid #cecece
}
.radio-cores input[type="radio"] {
display: none;
}
.radio-cores label {
display: inline-block;
color:#fff;
padding: 4px 11px;
font-family: Arial;
font-size: 16px;
cursor: pointer;
margin:3px;
border:1px solid #cecece
}
.product-color-blue {
background-color: blue;
}
.product-color-grey {
background-color: grey;
}
.product-color-red {
background-color: red;
}
.product-color-green {
background-color: green;
}
<form method="post" action="salva.php" enctype="multipart/form-data">
<div class="radio-cores">
<input type="radio" name="cor" value="1" />
<label class="product-color-blue"></label>
<input type="radio" name="cor" value="2" />
<label class="product-color-grey"></label>
<input type="radio" name="cor" value="3" />
<label class="product-color-red"></label>
<input type="radio" name="cor" value="4" />
<label class="product-color-green"></label>
</div>
</form>