Bootstrap 4 & Bootstrap 5 Comparison

Boostrap 5 image alignment

Images can be aligned with the help of float helper classes or text alignment classes. Please keep in mind that the image is an inline element hence change its display property to block and then apply the .mx-auto margin utility class to align the center of the image.

Bootstrap 4 Image Alignment

Images can be aligned with the help of float classes or text alignment classes. Since the image is an inline element so to change it into the center, change the inline element to a block-level element by display block property, and then it can be centered using the .mx-auto margin utility class.


Read More