CSS Framework Articles

Page 27 of 45

Align an element with the top of the tallest element on the line in Bootstrap 4

Amit Diwan
Amit Diwan
Updated on 11-Mar-2026 153 Views

Use align-top class to align an element with the top of the tallest element on the line.Align the element like this −   Top Alignment Let us see an example to implement the align-top class in Bootstrap 4 −Example       Bootstrap Example                             Example     This is demo text     Demo Baseline     Top Alignment     Middle Alignment     Bottom Alignment  

Read More

Align an element with the top of the parent element's font in Bootstrap 4

Amit Diwan
Amit Diwan
Updated on 11-Mar-2026 313 Views

Use align-text-top class to align an element with the top of the parent element's font.Set the align-text-top class as −   Top Text You can try to run the following code to implement the align-text class in Bootstrap 4 −Example       Bootstrap Example                         Example   This is demo text   Demo Baseline   Top Alignment   Top Text   Bottom Text

Read More

Style Bootstrap 4 cards with bg-danger class

Amit Diwan
Amit Diwan
Updated on 11-Mar-2026 367 Views

To color Bootstrap cards, we use the contextual classes.For danger action, use the bg-danger contextual class with the card class −   Danger! High Voltage! You can try to run the following code to implement the card-danger class −Example       Bootstrap Example                             Messages           How you doing?              Danger! High Voltage!      

Read More

Display flex items vertically and reversed in Bootstrap 4

Ricky Barnes
Ricky Barnes
Updated on 11-Mar-2026 166 Views

The flex-column-reverse is used to display reversed flex items with vertical orientation. Add the flex-column-reverse class as in the following code snippet −After that, add flex items inside it −   Demo 1   Demo 2   Demo 3 You can try to run the following code to show flex items vertically and reversed −Example       Bootstrap Example                             Implementing Column Reverse           Demo 1         Demo 2       Demo 3      

Read More

Bootstrap 4 .flex-*-column-reverse class

Ricky Barnes
Ricky Barnes
Updated on 11-Mar-2026 942 Views

Use the flex-*-column-reverse class to display flex items vertically and reversed on different screen sizes.Here’s the example of reversing flex items on medium device using “flex-md-column-reverse” class −   One   Two   Three In the same way, set for large devices using “flex-lg-column-reverse” class −   One   Two   Three Implementing the .flex-*-column-reverse class −Example       Bootstrap Example                             Example     Change the browser size to see the effect:     Default           One       Two       Three         Flex on differet screen size (Medium-Reverse)           One       Two       Three         Flex on different screen size (Large-Reverse)           One       Two       Three      

Read More

Set a grey border to an element in Bootstrap 4

Ricky Barnes
Ricky Barnes
Updated on 11-Mar-2026 545 Views

Set a grey border to an element, using the border-secondary class in Bootstrap 4.Add it like the following example − I have also included the “mystyle” class to style the div − .mystyle {   width: 250px;   height: 150px;   margin: 10px; } Let us see an example to implement the border-secondary class −Example       Bootstrap Example                             .mystyle {       width: 250px;       height: 150px;       margin: 10px;      }           Shape   Rectangle with gray border

Read More

Container to create a grid of Bootstrap 4 cards of equal height and width

Amit Diwan
Amit Diwan
Updated on 11-Mar-2026 595 Views

Set a container of cards, using the card-deck class.Work it inside the following div that would be of equal width and height −         You can try to run the following code to implement the card-deck class −Example       Bootstrap Example                             Demo Messages     Note: Resize the browser to check the effect.                           Nothing new!                            Warning! Compile-time error!          Check again!                            We won!            

Read More

Style Bootstrap 4 cards with bg-dark class

Amit Diwan
Amit Diwan
Updated on 11-Mar-2026 2K+ Views

Use the bg-dark contextual class in Bootstrap 4 to add a gray background to a card −In the below code snippet, I have used the bg-dark class to style the Bootstrap card. With that, I have also the text-while class to set the text to be white −   This is it! Let us see the complete example to work with bg-dark class −Example       Bootstrap Example                             Notification            This is it!               How you doing?      

Read More

Create a Bootstrap 4 card header

Amit Diwan
Amit Diwan
Updated on 11-Mar-2026 707 Views

To create a card header in Bootstrap 4, use the card-header class. Set the header inside the card using the class −   Product List After adding the header, add the body of the card as shown in the following code snippet −Product List       Product One     Product Two   Let us see an example to learn how to create Bootstrap 4 card header −Example       Bootstrap Example                             Products           Product List           Product One       Product Two               This was the list of products in stock.      

Read More

Bootstrap 4 .border-warning class

Alex Onsman
Alex Onsman
Updated on 11-Mar-2026 261 Views

Use the border-warning class in Bootstrap to set orange border to an element.To add orange border, set the div as −   Warning (Orange border) You can try to run the following code to implement the border-warning class −Example       Bootstrap Example                             .new {       width: 200px;       height: 150px;       margin: 10px;     }       The following is a Rectangle:   Warning (Orange border)

Read More
Showing 261–270 of 445 articles
« Prev 1 25 26 27 28 29 45 Next »
Advertisements