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.
<button class="btn btn-success btn-lg float-right" type="submit">Submit</button>
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.
- How to place SVG icons on a round circle side by side to another div using Bootstrap?
- How to align navbar items to the right in Bootstrap 4 ?
- Java Program to Segregate 0s on Left Side & 1s on Right Side of the Array
- Difference between align-content and align-items
- How to create a radio button similar to toggle button using Bootstrap ?
- How to load notification alert on top right corner without click of button in bootstrap ?
- How to place button in top Right corner using bootstrap?
- How to use Bootstrap to align labels with content into 4 columns ?
- How to align buttons in Card footer in Bootstrap ?
- How to Align Navbar Items to Center using Bootstrap 4 ?
- How to Align navbar logo to the left screen using Bootstrap ?
- How to align header with wrapper in Bootstrap ?
- How to align two navbars in bootstrap ?
- How to align nested form rows using Bootstrap 4?
- How to Align modal content box to center of any screen?
- Server side and Client side Programming
- How to place two div side-by-side of the same height using CSS?
- How to float three div side by side using CSS?
- Linear Equations in One Variable - Solving Equations which have Linear Expressions on one Side and Numbers on the other Side | Class 8 Maths
- How to align flexbox columns left and right using CSS ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.