Answer the question
In order to leave comments, you need to log in
How to style a checkbox like this?
There is this code:
<label class="a-item">
<span class="a-item-box">
<input type="checkbox" value="1440" class="chAccess" data-value="">
</span>
<span class="a-item-title"> Какой-то текст </span><br>
<span class="a-item-price"> Цена </span>
</label>
Answer the question
In order to leave comments, you need to log in
No way on CSS, just take out input from a-item-box
Or make another span inside a-item-box
You need to attach a label to the checkbox. You hide the checkbox itself, but you style the label as you like.
<input type="checkbox" value="1440" class="chAccess" data-value="" id="check1">
<label for="check1"></label>
#check1{
position: absolute;
margin-left: -9999px;
visibility: hidden;
}
label{
/* Твои стили */
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question