Home » Categories » CSS Tricks

The :empty pseudo selector will select elements that contain either nothing or only an HTML comment.

div:empty{display: none;}

 

Ref:

https://css-tricks.com/almanac/selectors/e/empty/

Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
 
Attachments Attachments
There are no attachments for this article.
Comments Comments
There are no comments for this article. Be the first to post a comment.
Related Articles RSS Feed
CSS show/hide next elements
Viewed 449 times since Sun, Oct 4, 2020
CSS transition Property
Viewed 473 times since Wed, Sep 2, 2020
CSS vertical-align: text-bottom;
Viewed 668 times since Thu, Sep 3, 2020