Here's the issue I'm facing with my HTML code
<input type="checkbox" asset="AAA" name="assets[AAA]" value="AAA" id="assets[AAA]" class="c_green" checked="checked">
<label for="assets[AAA]"></label>
In my CSS, I have the following code
input[type=checkbox].c_green {
display:none;
}
input[type=checkbox].c_green+ label:before {
content:"";
display: block;
width:1em;
height:1em;
border: 2px solid #66BC29;
text-align: center;
line-height:1em;
}
input[type=checkbox].c_green:checked + label:before {
content:"\2713";
display: block;
font-size:1em;
color:#66BC29;
}
In Safari, the green label drawn after the hidden checkbox has no width if the checkbox is not checked (value=""
) and not visible. However, this works fine in Chrome and Firefox.
Can you identify what is wrong with the CSS code above?