Hide Empty Row
I have a very simple 3 x 10 grid, but depending on the input I want to hide various rows that do not contain any data.
Here is the HTML
4 Replies
You didn't post any html, but this seems easy enough to psuedocode. Depending on the content, you can check if a certain html element has any text to it.
How to do it if you want to check if the html element has any children elements:
if it's trully empty you can use :empty to style it
:empty - CSS: Cascading Style Sheets | MDN
The :empty CSS pseudo-class represents any element that has no children. Children can be either element nodes or text (including whitespace). Comments, processing instructions, and CSS content do not affect whether an element is considered empty.
Oh I didn't know that was a thing, neat!