HTML CSS examples for CSS Widget:Image
Overlay image inside <div>
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .content {<!--from ww w . j a v a2 s.co m--> width:501px; height:501px; border:16px solid Chartreuse; margin-top:0; padding-top:0; vertical-align:top } img#post-backgrnd { top:-16px; left:-16px; position:relative; } </style> </head> <body> <div class="content"> <img src="https://www.java2s.com/style/demo/Firefox.png" id="post-backgrnd">Lorem ipsum dolo </div> </body> </html>