- .card-inverse for white text - .card-block .card-img-overlay - text over an image - for better text visibility added background: rgba(0,0,0,0.4); to .card-block
Card - Header/Footer
Card - Header/Footer
<header class="card-header"></header>
<footer class="card-footer"> </footer>
Card - Header with Nav Tabs
Tab 1 Content
Card - Header with Nav Tabs
Tab 2 Content
Card - Header with Nav Tabs
Tab 3 Content
Grid - col-4 applied to .card
All cards in a row get the same height.
Card's elements alignment is not great and there is a double border between cards. Avoid this solution
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Grid - .card inside col-4 container
Layout settings - xs 1 col, sm 2 cols, md 3 cols, lg and over 4 cols
Cards get different height depending on content. Check Homepage panels for solution.
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Grid - Flex
To keep columns in a nice grid we used B4 classes d-flex flex-wrap justify-content-between for the container and css flex-basis: 32% for cards.
flex-basis: value% changes for different media queries depneding on how many columns we want to have.
Footer always sticks to the bottom
Always the same columns height in a row
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Grid - Bootstrap 4 .card-group class
Nicley groups cards in one row without dooble border between them.
Not very flexible. To break cards to next line you need to use another .card-group container.
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Grid - Bootstrap 4 .card-deck class
Nicley groups cards in one row with padding between them
To adjust gutter use $card-deck-margin: ($grid-gutter-width-base / 2) !default; in _variables.scss partial
The same as .card-group works best for small amount of columns.
Not very flexible. To break cards to next line you need to use another .card-deck container.
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Cards Grid
Grid - Bootstrap 4 .card-columns class
Nice masonry-like columns layout. Cards are ordered from top to bottom and left to right.
Layout settings - xs 1 col, sm 2 cols, md 3 cols, lg and over 4 cols
To set number of columns for a specific tier use column-count