In order to do display based on the value of an input, you need to make a duplicate of the input that is: type='hidden' hidden type inputs update their value in the DOM when it changes, unlike other input types which only display their default value (or their checked value in the case of radios and checkboxes) in the DOM regardless of what their actual value is. Your code would then look like this: HTML <div>
<input type="checkbox" name="attr_condition_1" value="1">
<input type='hidden' class='condition-display' name='attr_condition_1" value='1'>
<span class="sheet-body" >condition_1.</span> </div>
<div>
<input type="number" name="attr_condition_7" value="0" />
<input type='hidden' name='attr_conditiion_7' class='condition-display' value='0'>
<span class="sheet-body">condition_7.</span> </div>
........................
<input class="labelcheck" type="checkbox" name="attr_condition_1" value="1" />
<span class="lbl">condition_1</span> <br/>
<input type="number" name="attr_condition_7" class="nospin underlined spsml" value="0" />
<input type="hidden" name="attr_condition_7" value="0" />
<span class="lbl">condition_7.</span> <br/>
CSS: input.sheet-condition-display:not([value="0"]) ~ span.sheet-body {/*This should now work since the hidden's value will actually update.
However, I've noticed that the value= syntax can be finicky sometimes,
you may need to switch to [value*="0"] instead which does a search of
the value for the indicated substring*/
float: left;
}
input.sheet-condition-display [value="0"] ~ span.sheet-body {/*remove the value reference here, the :not([value="0"]) will make the above more
specific than this and will therefore overwrite it anyway.*/
display: none;
}
input.sheet-condition-display {/*You can probably remove this, and just remove the non-hidden type inputs. I left them in minus their class as
I wasn't sure what you needed*/
display: none;
} Hope that helps, Scott