html - can't use first-child css to set display -
i using wordpress , generating code:
<aside class="left-hand-column"> <div class="textwidget"> <p></p> ...1 <div class="pdf-download"> <p> ... 2 <a href="http://www.kusuma.ee-web.co.uk/wp-content/uploads/2016/04/strategy2015-2018.pdf" target="_blank">download pdf</a> </p> </div> <p></p> ...3 </div> </aside>
i want remove effects of <p></p>
tag pairs.
i thought set display:none them this:
.textwidget p:first-child { display:none; }
but making 1 , 2 p's disappear , leaving 3 - how need please?
if familiar jquery can use this
$('.textwidget p').each(function () { if ($(this).text().length === 0) { $(this).hide(); } });
Comments
Post a Comment