HTML CSS examples for CSS Form:input button layout
Center button toolbar inside div
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .col-lg-6{background: red; position:relative;} .btn-toolbar.nested-top{ text-align:center; position:absolute; top:0; width:100%; } .btn-default{display:inline-block;} .well.topnestedbut{<!-- w w w. j a va2 s . c o m--> padding:35px 10px 10px; } .noleftpad{ padding-left:0px; } </style> </head> <body> <div class="col-lg-6 col-sm-3 noleftpad"> <div class="well topnestedbut"> <div class="btn-toolbar nested-top"> <button type="button" class="btn btn-default btn-sm"> <strong>This must be centered</strong> </button> </div> </div> </div> </body> </html>