HTML CSS examples for CSS Layout:Column Layout
Extend a CSS column to the top of its parent
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .display-table { display: table; } .display-tCell{ display: table-cell; vertical-align: top; background-color: gray; } .col2{<!-- w ww.ja va 2s .c om--> background-color: red; } </style> </head> <body> <div class="display-table"> <div class="display-tCell"> test <br> texttexttest <br> test <br> texttexttest <br> test <br> texttexttest <br> test <br> texttexttest <br> test <br> texttexttest <br> test <br> texttexttest <br> </div> <div class="display-tCell col2"> test <br> texttexttests </div> </div> </body> </html>