Below is my CSS and HTML code.
Given CSS selector is not applied when there is a hidden
field between INPUT
and SPAN
tags
CSS
input[type="checkbox"] + .lbl:before {
background-color: #FAFAFA;
border: 1px solid #CCCCCC;
}
CSS Working
<label>
<input name="SMS" type="checkbox" />
<span class="lbl"> choice 2</span>
</label>
CSS Not Applied
<label>
<input name="SMS" type="checkbox" />
<input type="hidden" value="false" name="SMS">
<span class="lbl"> choice 2</span>
</label>
How can I change/add new CSS selector change to support both cases?
Note: The Hidden
field was automatically generated by ASP.Net MVC
framework and we dont have a control to place it in other place