Loading Please Wait...

Logo Lynxsia IT Solutions

CSS Table Style

CSS Table Style

We can style table in different ways like spacing, stripped table, hoverable table, header and footer, etc.

Table Spacing

Use CSS padding property to give space between text and border inside table cell that is <th> and <td>

					 
        
          th, td{
            padding: 0.5rem;
          }
        
      
Horizontal Dividers

Use CSS border-bottom property only to <th> and <td> element to create horizontal divider table.

					 
        
          th, td{
            border-bottom: 1px solid #31355b;
          }
        
      
Hoverable Table

Use CSS :hover selector to <tr> element to create hoverable table.

					 
        
          tr:hover { background-color: #a3a5b6; }
        
      
Stripped Table

Use CSS :nth-child() selector to <tr> element to create stripped table.

					 
        
          tr:nth-child(even) { background-color: #d1d2db; }
        
      
Table Header And Footer

Use CSS background-color and color properties to <thead> and <tfoot> element.

					 
        
          thead{
            background-color: #1a1e49;
            color: #ecf1f9;
          }

          tfoot{
            background-color: #767892;
            color: #ecf1f9;
          }
        
      

How you feel about this blog:

Share this blog on:

Report Us

If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com

Contact Us
Ads
Logo
Lynxsia IT Solutions

We are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..

Kotwali Road, Chhiptehri, Banda, 210001, UP, India

Copyright © 2022, Lynxsia IT Solutions, All rights reserved