how to force table has a min-height even if no tr in the tbody?

matiascx used Ask the Experts™
Hi, experts,
I have a requirement of css layout:
Even if no table data, we must make sure the table at least occupy some height place.
How to let that happen?
I have created one plunker, any help is appreciated, thanks!
<!DOCTYPE html>

    <link rel="stylesheet" href="style.css">
    <script src="script.js"></script>
        height: 100px;
        width:  100px;
        background: blue;
        height: 500px;
        background: red;

      <tbody class="nocontent">


Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Software Developer
Table layouts are a bit funky. The easiest way to ensure what you need is to enclose the entire table in a <div> element and set its min-width and min-height properties.


Exactly what i need.
Thank you~!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial