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 :)
pin the first place? I would recommend placing some server side logic to not even render this element if you don't want to display it. What you are trying to achieve seems counter intuitive<p>tags with that class? or are you looking to handle this specific element by ID?<p>s get hidden automatically by the browsers?