I am trying to hide the following element in an automatically generated HTML document:
There's no way to detect empty elements in pure CSS (as yet). If Javascript isn't an option, is there anything you can do server-side to manipulate the HTML before it reaches the browser?
You could use:
p.sitspagedesc {
content: " ";
display: none;
}
Unless you randomly have multiple spaces in there...
Answer: Not yet, but it's drafted.
https://drafts.csswg.org/selectors-4/#the-blank-pseudo
...and —at least for Mozilla— there's already a prefixed implementation... :-moz-only-whitespace
:
http://jsfiddle.net/peayLrv3/