HTML CSS examples for CSS Layout:Position
Positioning a div in the middle of another div
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #button<!--from ww w. j a v a 2s. com--> { position:fixed; top:0; left:0; width:100px; height:100px; background-color:Chartreuse; } #plus { position:relative; width:51%; height:51%; top:26%; margin:0 auto; background:orange; } </style> </head> <body> <div id="button"> <div id="plus"> Lor </div> </div> </body> </html>