I have a situation where I utilized the :empty
selector within the .error
class. However, I'm encountering an issue where even if there is no content inside the div with the error class, the error class does not get removed entirely. Upon examination in Firebug, I discovered that there are some white spaces remaining within the div, and once those extra spaces are removed, the div disappears.
.error{ border:solid 1px #ff0000; color:#ff0000;}
.error:empty{ display:none;}
During debugging, the div appears as follows:
<div class="error"> </div>
The additional spaces visible are causing this issue. Is there a way to make
in CSS display:none? Any assistance would be greatly appreciated.