![]() |
Bootstrap is used to customize the appearance and layout of web applications. To left and right align text within a <div> in Bootstrap, we can use utility classes such as text-start and text-end, combined with the grid system for responsive design. Below are the approaches to let and right align text within a Div in Bootstrap: Table of Content Using Flexbox ClassesIn this approach, we are using Bootstrap’s flexbox utility classes (d-flex, justify-content-start, justify-content-end) to left and right align text within <div> containers. Example: The below example uses Flexbox Classes to Left and Right Align Text within a DIV in Bootstrap.
Output: Using Utility ClassesIn this approach, we are using Bootstrap’s utility classes (text-start and text-end) to left-align and right-align text within the <div> containers, while also applying custom border styles (border-primary and border-success) for enhanced visual appeal. Example: The below example uses Utility Classes to Left and Right Align Text within a DIV in Bootstrap.
Output: |
Reffered: https://www.geeksforgeeks.org
Bootstrap |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 14 |