avoid rows being evenly distributed vertically in a table - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Row

Description

avoid rows being evenly distributed vertically in a table

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>Lorem ipsum dolor sit amet, consectetur adi</title> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
table {<!--from   w  w  w.ja  v  a 2  s.c  o  m-->
   border:2px dotted Chartreuse;
   width:301px;
   table-layout:fixed;
}

td {
   vertical-align:top;
   height:11px;
}

td.last {
   background-color:yellow;
   height:auto;
}
</style> 
 </head> 
 <body> 
  <table> 
   <tbody> 
    <tr> 
     <td rowspan="4">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor neque, ornare vitae tempor hendrerit, luctus at neque. Phasellus sed quam pharetra, tincidunt tortor in, pharetra nisl. Maecenas aliquam luctus mauris, vitae venenatis diam imperdiet vel. Donec tortor diam, pretium vitae nibh vitae, consectetur lacinia sem. Proin luctus facilisis volutpat. Ut semper sit amet purus quis ornare. Quisque lobortis neque vitae tempor iaculis. Aliquam erat volutpat. Mauris tincidunt eget lacus eget pulvinar. Suspendisse potenti. Maecenas blandit tempus m</td> 
     <td>Lorem ipsum dolor sit amet, consec</td> 
    </tr> 
    <tr> 
     <td>Lorem</td> 
    </tr> 
    <tr> 
     <td>Lorem</td> 
    </tr> 
    <tr> 
     <td class="last">Lorem</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials