The .pull-left and .pull-right classes have been replaced with the .float-left and .float-right classes in Bootstrap 4. These utility classes are used to float an element to the left or right on the various viewport sizes based on the Bootstrap Grid. It works using the CSS float property.
Using .pull-left and .pull-right classes
These classes help to float the elements:
- The .pull-left class is used to float the element to the left.
- The .pull-right class is used to float the element to the right.
There are three classes which help in floating the elements:
- The .float-left class is used to float the element to the left.
- The .float-right class is used to float the element to the right.
- The .float-none class is used to disable the floating.
These classes will work on all viewport sizes unless specified using their responsive versions.
Responsive floating based on viewport sizes
The responsive variations of the base classes can be used to apply the floating only on specified viewport sizes. There are four viewport size variations available to be used.
- sm: This is the small breakpoint. All classes using this will float on viewports sized small or wider.
- md: This is the medium breakpoint. All classes using this will float on viewports sized medium or wider.
- lg: This is the large breakpoint. All classes using this will float on viewports sized large or wider.
- xl: This is the extra-large breakpoint. All classes using this will float on viewports sized extra-large or wider.
- Include Bootstrap in AngularJS using ng-bootstrap
- Difference between bootstrap.css and bootstrap-theme.css
- PHP | Classes
- ES6 | Classes
- Classes of JSP API
- Perl | Classes in OOP
- Classes in TypeScript
- jQuery | Get and Set CSS Classes
- CSS | Pseudo-classes
- How to specify the order of classes in CSS ?
- C# | Abstract Classes
- Abstract Classes in PHP
- Wildcard Selectors (*, ^ and $) in CSS for classes
- Abstract Classes in Python
- Kotlin Inline classes
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.