How to align button to right side of text box in Bootstrap? Read Courses Practice Improve Improve Improve Like Article Like Save Article Save Report issue Report Bootstrap allows us to align elements by using the utility class float. As we want to align the button to the right side of the text box, we have to use the float-right class. Syntax: <button class="btn btn-success btn-lg float-right" type="submit">Submit</button> Example: html <!DOCTYPE html> <html> <head> <title>Bootstrap Button Alignment</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href= "https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> <script src= "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"> </script> <script src= "https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"> </script> </head> <body> <div class="container"> <h1 style="text-align:center;color:green;"> GeeksforGeeks </h1> <form> <div class="form-group"> <label for="">Enter Your Name:</label> <input class="form-control" type="text" placeholder="Input Your Name Here"> </div> <div class="form-group"> <button class="btn btn-success btn-lg float-right" type="submit"> Submit </button> </div> </form> </div> </body> </html> Output: Note: Although by default, elements like buttons, are left-aligned still we can use float-left class to mention it specifically. We can also use the class float-none to remove any hierarchical floating. It is important to note that we are using Bootstrap 4 here, in Bootstrap 3 or Bootstrap 2 we can use the helper classes like pull-left, pull-right to align the elements to the left or right accordingly. Learn to code easily with our course Coding for Everyone. This course is accessible and designed for everyone, even if you're new to coding. Start today and join millions on a journey to improve your skills!Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now! Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore. Last Updated : 18 Aug, 2021 Like Article Save Article Previous How to place SVG icons on a round circle side by side to another div using Bootstrap? Next How to change navigation bar color in Bootstrap ? Share your thoughts in the comments Add Your Comment Please Login to comment...