HTML CSS examples for CSS Layout:Absolute Position
Position: absolute and automatic width via content
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .container_1 {<!--from w ww . j av a 2s . co m--> position:absolute; top:21px; left:21px; } .container_2 { position:absolute; width:96px; overflow:hidden; white-space:nowrap; } </style> </head> <body> <div class="container_1"> <div class="container_2"> Lorem ipsum dolo </div> </div> </body> </html>