HTML CSS examples for CSS Layout:Position
Title positioning with CSS
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #first {<!--from w ww. ja v a 2 s .c o m--> position:relative; height:201px; } #first div>h2 { position:absolute; width:381px; padding:11px; background:red; bottom:0; margin:0; } </style> </head> <body> <div id="first"> <div> <img src="https://www.java2s.com/style/demo/Google-Chrome.png"> <h2>Lorem ipsum dolor sit <br>Lorem ipsu</h2> </div> </div> </body> </html>