I am trying to hide the following element in an automatically generated HTML document:
<p id="sitspagedesc" class="sitspagedesc">
</p>
In some pages, the <p>
tag will contain an inner value but in others it can contain only spaces as shown in the example. I need to find a way of hiding this so that it is hidden using CSS only, as changing the HTML is not an option.
I have tried to hide it using
.sitspagedesc:empty
{
display:none;
}
but this does not work, presumably on the account of the spaces the element contains.
Does anyone have any good ideas?
Thanks :)
` tags with that class? or are you looking to handle this specific element by ID?
– scunliffe Nov 14 '12 at 14:44`s get hidden automatically by the browsers?
– Mr Lister Nov 14 '12 at 15:40tags with this class, but I think javascript is probably the best option.
– Andy Kaufman Nov 14 '12 at 16:04` tag has a style to say include a default width/height/border etc. that will still show up.
– scunliffe Nov 14 '12 at 18:34