You can use these text alignment classes to align and format your text content.
| Class | Description | Test |
|---|---|---|
.text-start | Align the text to the left. | Example |
.text-center | Align the text to the center. | Example |
.text-end | Align the text to the right. | Example |
.text-wrap | Wrap the overflowing text. | Example |
.text-nowrap | Prevent text from wrapping. | Example |
.text-truncate | Truncate the text with an ellipsis. | Example |
.text-break | Break the long words to prevent overflow. | Example |
.text-lowercase | Transform the text to lowercase. | Example |
.text-uppercase | Transform the text to uppercase. | Example |
.text-capitalize | Capitalize the first letter of each word. | Example |
.fw-bold | Set the font-weight of an element to bold. | Example |
.fw-bolder | Set the font-weight of an element to bolder (relative to the parent). | Example |
.fw-normal | Set the font-weight of an element to normal. | Example |
.fw-light | Set the light font-weight for an element. | Example |
.fw-lighter | Set the lighter font-weight for an element (relative to the parent). | Example |
.fst-italic | Set the font-style of an element to italic. | Example |
.fst-normal | Set the font-style of an element to normal. | Example |
.font-monospace | Set the font-family of an element to monospace font (fixed-width) | Example |
.text-reset | Reset the color of a text or link (inherits the color from its parent). | Example |
.text-decoration-none | Remove the text decoration such as underline from a text. | Example |
.text-decoration-underline | Add underline to text. | Example |
.text-decoration-line-through | Add line through the middle of text. | Example |
Border Classes
You can use the border utility classes to quickly style the border and border-radius of an element. They are very useful for images, buttons, or any other element.
| Class | Description | Test |
|---|---|---|
.border | Add a border on all sides of an element. | Example |
.border-top | Add a border on the top side of an element. | Example |
.border-end | Add a border on the right side of an element. | Example |
.border-bottom | Add a border on the bottom side of an element. | Example |
.border-start | Add a border on the left side of an element. | Example |
.border-0 | Remove the border from all sides of an element. | Example |
.border-top-0 | Remove the border from top side of an element. | Example |
.border-end-0 | Remove the border from right side of an element. | Example |
.border-bottom-0 | Remove the border from bottom side of an element. | Example |
.border-start-0 | Remove the border from left side of an element. | Example |
.border-primary | Change the border-color of an element to blue (#007bff). | Example |
.border-secondary | Change the border-color of an element to grey (#6c757d). | Example |
.border-success | Change the border-color of an element to green (#28a745). | Example |
.border-danger | Change the border-color of an element to red (#dc3545). | Example |
.border-warning | Change the border-color of an element to yellow (#ffc107). | Example |
.border-info | Change the border-color of an element to teal (#17a2b8). | Example |
.border-light | Change the border-color of an element to very light grey (#f8f9fa). | Example |
.border-dark | Change the border-color of an element to dark grey (#343a40). | Example |
.border-white | Change the border-color of an element to white (#fff). | Example |
.rounded | Round all corners of an element. | Example |
.rounded-top | Round top-left and top-right corners of an element. | Example |
.rounded-end | Round top-right and bottom-right corners of an element. | Example |
.rounded-bottom | Round bottom-left and bottom-right corners of an element. | Example |
.rounded-start | Round top-left and bottom-left corners of an element. | Example |
.rounded-circle | Round an element into circle shape. | Example |
.rounded-pill | Round an element into pill shape. | Example |
.rounded-0 | Remove round corners from an element. | Example |
.rounded-1 | Set border-radius of 0.2rem for an element. | Example |
.rounded-2 | Set border-radius of 0.25rem for an element. | Example |
.rounded-3 | Set border-radius of 0.3rem for an element. | Example |