ShapeYourPath
(current)
Run Code
Live Code Editor- Bootstrap 4 Spinner Alignment
Source Code
<!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <title>Bootstrap 4 Spinner Alignment</title> </head> <body> <div class="container text-center mt-4"> <h1 class="text-center">Bootstrap 4 Spinner Alignment</h1> <p class="text-center">Flexbox utility class is used to align spinners. </p> <div class="row"> <div class="col-sm-12 col-12"> <!-- Left Alignment --> <div class="d-flex justify-content-start"> <div class="spinner-border" role="status"> <span class="sr-only">Loading...</span> </div> </div> <div class="d-flex justify-content-start"> <strong class="sr-only">Loading...</strong> <div class="spinner-border" role="status" aria-hidden="true"></div> </div> </div> </div> <div class="row"> <div class="col-sm-12 col-12"> <!-- Center Alignment --> <div class="d-flex justify-content-center"> <div class="spinner-border" role="status"> <span class="sr-only">Loading...</span> </div> </div> <div class="d-flex justify-content-center"> <strong class="sr-only">Loading...</strong> <div class="spinner-border" role="status" aria-hidden="true"></div> </div> </div> </div> <div class="row"> <div class="col-sm-12 col-12"> <!-- Right Alignment --> <div class="d-flex justify-content-end"> <div class="spinner-border" role="status"> <span class="sr-only">Loading...</span> </div> </div> <div class="d-flex justify-content-end"> <strong class="sr-only">Loading...</strong> <div class="spinner-border" role="status" aria-hidden="true"></div> </div> </div> </div> </div> <!--/container--> <!-- jQuery first, then Popper.js, then Bootstrap JS --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> </body> </html>
Output :
Running