Float left

Bootstrap 5 Float left component

Responsive float left built with Bootstrap 5. Easily align elements to the left with intuitive, responsive float utilities for better web design.


Basic example

These utility classes float an element to the left, based on the current viewport size using the CSS float property. !important is included to avoid specificity issues. These use the same viewport breakpoints as grid system. Note that float utilities have no effect on flex items.

Use .float-start to float an element to the left of its container.

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Minus reiciendis alias asperiores molestiae veniam nihil dolore quaerat libero voluptatibus, officia, ut ea deserunt itaque debitis assumenda, aliquid rerum officiis commodi? Nobis perspiciatis consequatur vero aut, placeat praesentium quam eveniet. A amet provident perferendis fugit, alias beatae unde qui velit dignissimos quidem architecto doloribus maiores quis ut. Eligendi, culpa, repudiandae sint quidem molestiae vero dolor cumque fugit aliquid ipsam voluptates distinctio. Corporis animi laborum nostrum labore similique ullam, optio quidem quae adipisci iste at molestiae, delectus voluptates deleniti sint molestias modi itaque deserunt officiis asperiores aliquam. Vitae nostrum autem animi assumenda!

        
            
  
                    <img src="https://mdbootstrap.com/img/new/textures/small/52.jpg" class="float-start">
  
                    <p class="">Lorem ipsum dolor sit amet consectetur, adipisicing elit. Minus reiciendis alias
                      asperiores molestiae veniam
                      nihil dolore quaerat libero voluptatibus, officia, ut ea deserunt itaque debitis assumenda, aliquid
                      rerum officiis
                      commodi? Nobis perspiciatis consequatur vero aut, placeat praesentium quam eveniet. A amet provident
                      perferendis
                      fugit, alias beatae unde qui velit dignissimos quidem architecto doloribus maiores quis ut.
                      Eligendi, culpa,
                      repudiandae sint quidem molestiae vero dolor cumque fugit aliquid ipsam voluptates distinctio.
                      Corporis animi laborum
                      nostrum labore similique ullam, optio quidem quae adipisci iste at molestiae, delectus voluptates
                      deleniti sint
                      molestias modi itaque deserunt officiis asperiores aliquam. Vitae nostrum autem animi assumenda!</p>
  
                    
        
    

Responsive

Responsive variations also exist for each float value.

Float left on viewports sized SM (small) or wider

Float left on viewports sized MD (medium) or wider

Float left on viewports sized LG (large) or wider

Float left on viewports sized XL (extra-large) or wider

        
            
          <div class="float-sm-start">Float left on viewports sized SM (small) or wider</div>
          <br />
          <div class="float-md-start">Float left on viewports sized MD (medium) or wider</div>
          <br />
          <div class="float-lg-start">Float left on viewports sized LG (large) or wider</div>
          <br />
          <div class="float-xl-start">Float left on viewports sized XL (extra-large) or wider</div>
          <br />