HTML CSS examples for CSS Layout:Layout
Fluid layout and place div to top
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #wrap {<!--from w ww .jav a 2 s. co m--> outline:2px solid red; width:100%; height:100%; } .message { outline:2px solid orange; width:100%; height:21px; overflow:hidden; } </style> </head> <body> <div id="wrap"> <div class="message"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed </div> <div class="message"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed </div> <div class="message"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed </div> </div> </body> </html>