HTML CSS examples for CSS Layout:Position
Position icon at the top right corner of a fieldset with legend
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .wrapper {<!--from w w w. ja v a 2s. c o m--> margin-top:100px; position:relative; height:401px; width:401px; border:2px solid Chartreuse; } .icon { position:absolute; width:41; height:41px; border:2px solid yellow; background-color:blue; top:-21px; right:11px; line-height:41px; } </style> </head> <body> <fieldset class="wrapper"> <legend>Lorem ipsu</legend> <div class="icon"> Lorem </div> </fieldset> </body> </html>