I have output that is returned via AJAX in the following format (with #the-poll-options
being the container that the AJAX is inserted in to).
<div id="the-poll-options">
<div class="error-output">
<p>Blah, blah, bla, etc, etc.</p>
</div>
</div>
I need to insert a heading to indicate an error -
<div id="the-poll-options">
<div class="error-output">
<h3>An error has occurred</h3>
<p>Blah, blah, bla, etc, etc.</p>
</div>
</div>
To do this, I've used the following CSS. This works to a point, but actually outputs <h3>An error has occurred</h3>
, rather than interpreting it as HTML.
#the-poll-options .error-output:before{
content: '<h3>An error has occured</h3>';
}
Is it possible to do this with pure CSS, without the need to use JS? Note that I cannot alter the HTML that is returned by the AJAX call. Thanks.
` with `
– SF. Oct 23 '13 at 15:41` and the consequences...