CSS empty-cell Properties


The empty-cells property indicates whether a cell without any content should have a border displayed.

This property can have one of the three values show, hide or inherit.

<html>
     <head>
        <style type="text/css">
        table.empty {
        border-collapse:separate;
        empty-cells:hide;
        }
        td.empty {
        padding:5px;
        border:1px solid #000;
        }
        </style>
        </head>
        <body>
        <table class="empty">
         <tr>
           <td class="empty">ACER</td>
           <td class="empty">DELL</td>
           <td class="empty"></td>
         </tr>
         
         <tr>
           <td class="empty"></td>
           <td class="empty">SONY</td>
           <td class="empty">HP</td>
         </tr>
        </table>
     </body>
    </html>
Output
ACER DELL
SONY HP

Share this article on