- In Bootstrap 4, H2 tag can be added beneath or below H1 tag. Whereas in case of using float the H2 tag can’t be added beneath or below H1 tag because the H2 tag will move to beneath end of H1 tag due to bootstrap 4 CSS properties.
- To eradicate this issue we can move H2 beneath H1 on the float by wrapping both tags with an element having flex properties or by individually wrapping each tags with an element having class clearfix.
Example 1: The following examples illustrate how to move H2 beneath H1 only with floats.
- How to move a file into a different folder on the server using PHP?
- How to move an element to left, right, up and down using arrow keys ?
- How to split text horizontally on mouse move over using CSS ?
- How to float three div side by side using CSS?
- jQuery | Move an element into another element
- script.aculo.us Move Effect
- CSS Float
- Converting a string variable into Boolean, Integer or Float type in Golang
- Bootstrap | Float utilities with Examples
- Formatting float column of Dataframe in Pandas
- Comparing float value in PHP
- How to make elements float to center?
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.