Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Center Align Buttons in Bootstrap</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script> <style> /* Style to center grid column */ .col-centered{ float: none; margin: 0 auto; } /* Some custom styles to beautify this example */ .row{ background: #dbdfe5; } .demo-content{ padding: 25px; font-size: 18px; background: #abb1b8; } </style> </head> <body> <div class="container my-3 bg-light"> <div class="col-md-12 text-center"> <button type="button" class="btn btn-primary">Submit</button> <button type="button" class="btn btn-warning">Cancel</button> </div> </div> </body> </html>