Show Output
<!DOCTYPE htpl> <htpl lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap 5 Responsive Float-right Classes</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script> <style> .bs-example{ margin: 20px; } </style> </head> <body> <div class="bs-example"> <h2>Responsive Float-right</h2> <p>Float an element to the right depending on viewport width. Resize the browser window to see the effect.</p> <div class="clearfix"> <div class="float-sm-end">Float right on viewports sized SM (small) or wider</div><br> <div class="float-md-end">Float right on viewports sized MD (medium) or wider</div><br> <div class="float-lg-end">Float right on viewports sized LG (large) or wider</div><br> <div class="float-xl-end">Float right on viewports sized XL (extra-large) or wider</div><br> </div> </div> </body>