Make the last cell of a table row have all the white space - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Make the last cell of a table row have all the white space

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   ww  w  . j  a  va 2s.co m-->
   width:100%;
   border-collapse:collapse;
   color:Chartreuse;
   font:13px/18px Tahoma, Arial, Helvetica, serif;
   margin-bottom:18px;
}

th {
   background:yellow;
   color:blue;
   font-size:14px;
}

td {
   background:pink;
   color:OrangeRed;
   font-size:14px;
}

td, th {
   padding:9px;
   border-bottom:2px solid grey;
   text-align:left;
}
</style> 
 </head> 
 <body> 
  <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
   <tbody> 
    <tr> 
     <th align="left" valign="top">Lorem ip</th> 
     <th align="left" valign="top">Lorem ip</th> 
     <th align="left" valign="top">Lorem ip</th> 
     <th align="left" valign="top">Lorem ip</th> 
    </tr> 
    <tr> 
     <td align="left" valign="top">Lorem ipsum dolor sit amet, consectetur adipiscing </td> 
     <td align="left" valign="top">Lorem ipsum </td> 
     <td align="left" valign="top">Lorem ipsum </td> 
     <td align="left" valign="top">Lorem ipsum </td> 
    </tr> 
    <tr> 
     <td align="left" valign="top">Lorem ipsum </td> 
     <td align="left" valign="top">Lorem ipsum </td> 
     <td align="left" valign="top">Lorem ipsum </td> 
     <td align="left" valign="top">Lorem ipsum </td> 
    </tr> 
    <tr> 
     <td align="left" valign="top">Lorem ipsum </td> 
     <td align="left" valign="top">Lorem ipsum </td> 
     <td align="left" valign="top">Lorem ipsum </td> 
     <td align="left" valign="top">Lorem ipsum </td> 
    </tr> 
    <tr> 
     <td align="left" valign="top">Lorem ipsum </td> 
     <td align="left" valign="top">Lorem ipsum </td> 
     <td align="left" valign="top">Lorem ipsum </td> 
     <td align="left" valign="top">Lorem ipsum </td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials