Triangle corners in table head thead - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Row

Description

Triangle corners in table head thead

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
table .main_cat_left {
   padding:13px;
   text-align:left;
   background:Chartreuse;
   text-align:left;
   color:yellow;
   padding-left:6%;
}

table .main_cat_center {
   background:linear-gradient(to bottom left, blue 51%, pink 51%);
}

table .main_cat_right {
   padding:13px;
   font-size:12px;
   text-align:right;
   background:OrangeRed;
   font-weight:normal;
   text-align:right;
   color:grey;
   padding-right:6%;
}

table {<!--from  w  w  w .j a v a 2  s.co  m-->
   border-collapse:collapse;
   width:100%;
   font-family:sans-serif;
   font-size:15px;
}

td {
   padding:11px;
   text-align:center;
}

th {
   padding:13px;
   text-align:left;
   background:BlueViolet;
   text-align:center;
   color:Chartreuse;
}

table .hurt_td {
   background:yellow;
   color:blue;
   text-align:center;
   padding:11px;
}

table .main_cat_left {
   padding:13px;
   text-align:left;
   background:pink;
   text-align:left;
   color:OrangeRed;
   padding-left:6%;
}

table .main_cat_right {
   padding:13px;
   font-size:12px;
   text-align:right;
   background:grey;
   font-weight:normal;
   text-align:right;
   color:BlueViolet;
   padding-right:6%;
}

tbody tr:nth-child(odd) {
   background:Chartreuse;
}

tbody tr:nth-child(even) {
   background:yellow;
}
</style> 
 </head> 
 <body> 
  <table class="zebra"> 
   <thead> 
    <tr> 
     <th class="main_cat_left" colspan="2">Lorem ipsum dolor sit amet, consectetur</th> 
     <th class="main_cat_center" colspan="1"></th> 
     <th class="main_cat_right" colspan="3">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus se</th> 
    </tr> 
    <tr> 
     <th width="24%">Lorem </th> 
     <th width="19%">Lorem</th> 
     <th width="0"></th> 
     <th width="19%">Lorem ip</th> 
     <th width="19%">Lorem ipsum </th> 
     <th width="19%">Lorem ipsum dol</th> 
    </tr> 
   </thead> 
   <tbody> 
    <tr> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td></td> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td>Lorem</td> 
    </tr> 
    <tr> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td></td> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td>Lorem</td> 
    </tr> 
    <tr> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td></td> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td>Lorem</td> 
    </tr> 
    <tr> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td></td> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td>Lorem</td> 
    </tr> 
    <tr> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td></td> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td>Lorem</td> 
    </tr> 
    <tr> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td></td> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td>Lorem</td> 
    </tr> 
    <tr> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td></td> 
     <td>Lorem</td> 
     <td>Lorem</td> 
     <td>Lorem</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials