Amit Diwan has Published 103 Articles

Style Bootstrap 4 cards with bg-dark class

Amit Diwan

Amit Diwan

Updated on 16-Jun-2020 12:11:30

1K+ 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 ... Read More

How to create footer for Bootstrap 4 card

Amit Diwan

Amit Diwan

Updated on 16-Jun-2020 12:08:35

212 Views

To create a footer in Bootstrap 4 card, use the card-footer class.Set the footer −   Footer message The footer class comes after the card-body and card-header class, since the footer is always in the bottom as the footer of a web page. Here is the complete code −   ... Read More

Create a Bootstrap 4 card header

Amit Diwan

Amit Diwan

Updated on 16-Jun-2020 12:03:46

526 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 ... Read More

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

Amit Diwan

Amit Diwan

Updated on 16-Jun-2020 11:50:05

180 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 −ExampleLive Demo       Bootstrap Example     ... Read More

Style Bootstrap 4 cards with bg-danger class

Amit Diwan

Amit Diwan

Updated on 16-Jun-2020 11:38:39

255 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 −ExampleLive Demo       Bootstrap Example                             Messages           How you doing?              Danger! High Voltage!      

Container to create a grid of Bootstrap 4 cards

Amit Diwan

Amit Diwan

Updated on 16-Jun-2020 10:42:26

431 Views

Create a grid of cards with Bootstrap 4, using the card-columns class.Set the grid inside the class −   Include the card body inside the card container as in the following code snippet. I have added the card body under the card-class. The card-class is added inside the card-columns ... Read More

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

Amit Diwan

Amit Diwan

Updated on 16-Jun-2020 10:40:24

67 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 −ExampleLive Demo       Bootstrap Example     ... Read More

Remove the top border from an element in Bootstrap 4

Amit Diwan

Amit Diwan

Updated on 16-Jun-2020 09:06:59

2K+ Views

Use the border-top-0 class to remove the top border from an element.Set the class as if we add any other class to an element −   Top border is missing Above, I have taken as our element. Another class “mystyle” is also added that styles our div −.mystyle { ... Read More

Align single rows of items at the baseline on different screens in Bootstrap 4

Amit Diwan

Amit Diwan

Updated on 16-Jun-2020 09:04:55

79 Views

Use the .align-items-*-baseline in Bootstrap 4 to align single rows of items at the baseline on different screens.On different screen sizes, align single rows of items as shown below −Align at the baseline on Small Screen Size   Item 1   Item 2   Item 3   Item 4 Align ... Read More

Place an element in the middle of the parent element in Bootstrap 4

Amit Diwan

Amit Diwan

Updated on 16-Jun-2020 09:02:33

259 Views

Use align-middle class to place an element in the middle of the parent element.To place an element in the middle −   Middle Alignment Let us seen an example to implement the align-middle class in Bootstrap 4 −ExampleLive Demo       Bootstrap Example       ... Read More

Advertisements