Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Keeping content in two table columns stuck to the roof of the respective table column

By: a guest on Feb 28th, 2012  |  syntax: None  |  size: 0.53 KB  |  views: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. td {
  2.   vertical-align:top;
  3. }
  4.        
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html xmlns="http://www.w3.org/1999/xhtml">
  7. <head>
  8. <title>Table Columns Alignments</title>
  9. </head>
  10.  
  11. <body>
  12.         <table>
  13.                 <colgroup>
  14.                         <col valign="bottom"/>
  15.                         <col />
  16.                         <col valign="top"/>
  17.                 </colgroup>
  18.                 <tbody>
  19.                         <tr>
  20.                                 <td>aligned to bottom</td>
  21.                                 <td>no special<br/>alignment<br/><p>here</p></td>
  22.                                 <td>aligned to top</td>
  23.                         </tr>
  24.                 </tbody>
  25.         </table>
  26. </body>
  27. </html>