Border-radius clipping on a table - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Border

Description

Border-radius clipping on a table

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 {<!--from   w w w  .j  a v  a  2  s.com-->
   border:2px solid Chartreuse;
   border-collapse:separate;
   border-radius:16px;
   margin:21px auto 0;
   overflow:hidden;
   width:87%;
}

thead {
   background:yellow;
}

th, td {
   border-left:2px solid blue;
   padding:7px;
   text-align:center;
}

th:first-child, td:first-child {
   border-left:none;
}

thead th:first-child {
   border-top-left-radius:16px;
}

thead th:last-child {
   border-top-right-radius:16px;
}
</style> 
 </head> 
 <body> 
  <table> 
   <thead> 
    <tr> 
     <th>Lorem</th> 
     <th>Lorem</th> 
     <th>Lorem</th> 
    </tr> 
   </thead> 
   <tbody> 
    <tr> 
     <td>Lorem ips</td> 
     <td>Lorem ips</td> 
     <td>Lorem ips</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials