HTML CSS examples for CSS Layout:Relative Position
Position relative and right property
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .parent {<!--from w w w .j a v a2 s. c om--> position:relative; width:100%; } .right { position:absolute; width:201px; height:201px; background:red; top:0; right:0; } </style> </head> <body> <div class="parent"> <div class="right"></div> </div> </body> </html>