How to Wrap Text Around Image in Bootstrap ? Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like Report To wrap text around an image in Bootstrap 5, you can apply the 'float' utility classes along with the 'img-fluid' class for responsive images. This technique involves floating the image to the left or right and creating margins to allow the text to wrap around it. ApproachThe code uses Bootstrap 5 classes like container, row, and col-lg class to structure the layout.The float-end class is used to float the image to the right, allowing the text to wrap around it.The imgshadow class adds a shadow effect to the image using CSS.The img-fluid class ensures the image is responsive and adjusts its size based on the screen size.Example: This example describes wrapping text around an image in Bootstrap 5 using Float Class. HTML <!DOCTYPE html> <html lang="en"> <head> <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"> <title>Wrap Text</title> <style> .imgshadow { box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); } </style> </head> <body> <section id="about" class="about py-5"> <div class="container"> <div class="row"> <div class="col-lg-7 pt-4 pt-lg-0"> <h1 class="text-success">GeeksforGeeks</h1> <h3>Using Bootstrap 5 Float Class</h3> <br /> <img src="https://media.geeksforgeeks.org/wp-content/cdn-uploads/20190710102234/download3.png" class="float-end imgshadow me-3 mb-3" alt="GeeksforGeeks"> <p> GeeksforGeeks is a leading platform that provides computer science resources and coding challenges for programmers and technology enthusiasts, along with interview and exam preparations for upcoming aspirants. With a strong emphasis on enhancing coding skills and knowledge, it has become a trusted destination for over 12 million plus registered users worldwide. The platform offers a vast collection of tutorials, practice problems, interview tutorials, articles, and courses, covering various domains of computer science. </p> </div> </div> </div> </section> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script> </body> </html> Output:Example: This example also describes wrapping text around an image. HTML <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Text Wrapping Around Image</title> <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"> <style> .content img { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); } </style> </head> <body> <div class="container py-5"> <div class="row"> <div class="col-md-8"> <div class="content"> <img src="https://media.geeksforgeeks.org/wp-content/cdn-uploads/20190710102234/download3.png" alt="Placeholder Image" class="img-fluid float-md-end me-md-3 mb-3"> <p> How many times were you frustrated while looking out for a good collection of programming/algorithm interview questions? What did you expect and what did you get? This portal has been created to provide well-written, well-thought, and well explained solutions for selected questions. </p> <p> An IIT Roorkee alumnus and founder of GeeksforGeeks. He loves to solve programming problems in the most efficient ways. Apart from GeeksforGeeks, he has worked with DE Shaw and Co. as a software developer and JIIT Noida as an assistant professor. It is a good platform to learn programming. It is an educational website. Prepare for the Recruitment drive of product-based companies like Microsoft, Amazon, Adobe, etc., with a free online placement preparation course. </p> </div> </div> </div> </div> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script> </body> </html> Output: Create Quiz Comment G gauravggeeksforgeeks Follow 0 Improve G gauravggeeksforgeeks Follow 0 Improve Article Tags : Web Technologies Bootstrap Bootstrap-Questions Explore LayoutBootstrap 5 Introduction 4 min read Bootstrap 5 Layout Breakpoints 3 min read Bootstrap 5 Layout Containers 3 min read BootStrap 5 Layout Grid System 3 min read Bootstrap 5 Columns 2 min read Bootstrap 5 Gutters 2 min read Bootstrap 5 Utilities 2 min read Bootstrap 5 Z-index 2 min read ContentBootstrap Reboot 2 min read Bootstrap 5 Typography 2 min read Bootstrap 5 Images 1 min read Bootstrap 5 Tables 2 min read Bootstrap 5 Figures 2 min read FormsBootstrap-5 Forms 2 min read Bootstrap 5 Form Controls 2 min read Bootstrap 5 Select 2 min read Bootstrap 5 Checks and Radios 2 min read Bootstrap 5 Range 2 min read Bootstrap 5 Input Group 3 min read Bootstrap 5 Floating labels 2 min read Forms LayoutBootstrap 5 Layout Forms 2 min read Bootstrap5 Layout Utilities 2 min read Bootstrap 5 Layout Form Grid 2 min read Bootstrap 5 Layout Gutters 2 min read Bootstrap 5 Layout Horizontal form 2 min read Bootstrap 5 Layout Horizontal form label sizing 2 min read Bootstrap 5 Layout Column sizing 2 min read Bootstrap 5 Layout Auto-sizing 2 min read Bootstrap 5 Layout Inline forms 2 min read Bootstrap 5 Validation 4 min read ComponentsBootstrap 5 Accordion 3 min read Bootstrap 5 Alerts 2 min read Bootstrap 5 Badges 2 min read Bootstrap Breadcrumb 2 min read Bootstrap 5 Buttons 3 min read Bootstrap 5 | Button group 4 min read Bootstrap 5 | Card 11 min read Bootstrap 5 Carousel 3 min read Bootstrap 5 | Close button 1 min read Bootstrap 5 Collapse 3 min read Bootstrap 5 Dropdowns 9 min read Bootstrap 5 List group 5 min read Bootstrap 5 Modal 7 min read NavbarBootstrap 5 Navbar Brand 3 min read Bootstrap 5 Navbar Brand Text 2 min read Bootstrap Navbar Brand Image 2 min read Bootstrap 5 Navbar Nav 2 min read Bootstrap 5 Navbar Forms 2 min read Bootstrap 5 Navbar Text 2 min read Bootstrap 5 Offcanvas 12 min read Bootstrap 5 Popovers 2 min read Bootstrap 5 Progress 5 min read Bootstrap 5 Scrollspy 4 min read Bootstrap 5 Spinners 3 min read Bootstrap 5 Toasts 3 min read Bootstrap 5 Tooltips 3 min read HelpersBootstrap 5 Clearfix 2 min read Bootstrap 5 Colored links 2 min read Bootstrap 5 Ratios 2 min read Bootstrap 5 Position 2 min read Bootstrap 5 Visually hidden 2 min read Bootstrap 5 Stretched link 2 min read Bootstrap 5 Text Truncation 2 min read ExtendBootstrap 5 Approach 3 min read Bootstrap 5 Icons 2 min read UtilitiesBootstrap 5 Background 2 min read Bootstrap 5 Borders 2 min read Bootstrap 5 Colors 3 min read Bootstrap 5 Display 3 min read Bootstrap 5 Flex 3 min read Bootstrap 5 Float 3 min read Bootstrap 5 Interactions 3 min read Bootstrap 5 Overflow 2 min read ReferencesBootstrap 5 Layout Complete Reference 5 min read Bootstrap 5 Content Complete Reference 7 min read Bootstrap 5 Forms Reference 7 min read Bootstrap 5 Components Reference 15+ min read Bootstrap 5 Helpers Reference 2 min read Bootstrap 5 Utility Reference 11 min read Like