InterviewSolution
Saved Bookmarks
| 1. |
Float an element to the right with Bootstrap |
|
Answer» Use the pull-right class in BOOTSTRAP to float an element to the right. Let us see an example wherein an element is displayed on the right: <!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Pull Right</title> <meta charset="utf-8"> <meta name="viewport" CONTENT="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <BODY> <div class="container"> <h2>Floating an element</h2> <div class="pull-right"> This is on the right! </div> </div> </body> </html>The output displays our <div> on the right: |
|