Bootstrap 4 Cards | Bootstrap 4 Cards Tutorial — DesignHub4u
Hello Guys, In this article of Bootstrap 4 Tutorial. We will uncover Bootstrap 4 cards. If you don’t have read another post of Bootstrap then you can read another post if you want. Because we have made many posts on Bootstrap 4. Let’s talk about Bootstrap 4 cards.
if we can talk about Cards in bootstrap, Then Bootstrap provides cards from starting. If we can check previous versions of boostrap then we will found everywhere cards. And also cards are very useful for all the new projects. This will give a better look to your container and also this one is lightweight. So let’s see the definition of cards.
What are Bootstrap 4 Cards
The Bootstrap 4 card component is a container that is covered by borders and some kind of paddings and margins. This will give a better look at your small containers. this one is used to show data in an attractive look. Cards will incorporate options for Images, headers, and footers, and a wide area of containers. In bootstrap 4 we will see various background colors for cards. colorful background will make this very beautiful.
If you are familiar with bootstrap’s oldest versions then cards have replaced the panel, well, Thumbnail. In the old version, we also used cards with different named but here in the bootstrap 4 we have these contents with cards named.
Here in the cards, you can present whatever you want with amazing look. mainly everyone uses cards for showing Images, Text, Links, Text and also Buttons. If you want to show your Images, Texts, Buttons among then card will best for you. This will give a new and soft look for your data. and one of the best things about cards is you can use any kind of class in the cards. There are no limitations to cards.
Bootstrap 4 is a combination of many contents. So, Let’s see all the contents of cards in the very deep.
We also have youtube channel for web designers and developers only. So Let’s Go and Subsribe Us on Youtube. Channel Name : DesignHub4u
Content types of Bootstrap 4 Cards
The card supported wide verities of contents like Images, Texts, Buttons, Labels and many more. Let’s see the examples that card supports.
1. Body
The building block of cards is the body. I mean to say that if we assume mail and leaning Piller is the body of the card. This will design content with some specific paddings and margins. You can use define card body using.card-body
. Now, See the example of the card body. This is only body example. First, We will see all the components separated and after that, we will see a full example of the card. This will help you to know more deep bootstrap 4 cards.
Example of Card Body
EXAMPLE NOT SHOWING HERE PLEASE CHECK IN THE OFFICIALE WEBSITE DESIGNHUB4U.COM
2. Titles, Text, and Links
The card titles are managed by using a class. Like if you want to use Title in the card then you have to use.card-title
in the header tags. Like. as per your needs.
There is also a class for subtitles also. Like here you have two headers one is the main and the second one is subheader then you can define subheader using.card-subtitle
class. This all works with
If you want to add any kind of links in Bootstrap cards then you have to use.card-link
class for that in the Anchor tag. If you are using .card-link class in any texts then that text will represents like a link. Let's see an example of this.
Example of Card Titles, Texts, and Links
EXAMPLE NOT SHOWING HERE PLEASE CHECK IN THE OFFICIALE WEBSITE DESIGNHUB4U.COM
3. Images
Yes, In the cards you can also use images. You can use images in the cards using .card-img-top
and .card-img-bottom
. This will arrange your images as your needs. If you want your image at the top of card then you can use .card-img-top and if you want your image in the bottom then you have to use .card-img-bottom. Let's see the example using images on the card.
Example of Card Image
EXAMPLE NOT SHOWING HERE PLEASE CHECK IN THE OFFICIALE WEBSITE DESIGNHUB4U.COM
4. List groups
Here you can also group your list on the card. Sometimes you have to need to list your group then you have to use a .list-group
class. From using this class you can list your group very easily. here many supportive classes also available for listing a group. Like .list-group-flush
, .list-group-item
and many more. Which will make your list group very attractive.
Example of List Groups in Bootstrap Cards
EXAMPLE NOT SHOWING HERE PLEASE CHECK IN THE OFFICIALE WEBSITE DESIGNHUB4U.COM
The Header and footer also have specific classes for themselves. On the card, you have a header and footer which you have to highlight in the cards. Then here we have classes like .card-header
and .card-footer
. Wich will present your header and footer in the card. I have also an example of a header and footer. So let us check this example for your deep knowledge.
Example of Card Header and Card Footer in Bootstrap 4
You can resize your Cards using width as per your needs.
6. Bootstrap 4 Card Background Colors
You know very well bootstrap provides more than eight colors for internal use. These all the colors are also work in the cards. I have an example of all the colors that I have to give you at the bottom.
Example of Card Background colors
EXAMPLE NOT SHOWING HERE PLEASE CHECK IN THE OFFICIALE WEBSITE DESIGNHUB4U.COM
Read Also:
1. Introduction of Bootstrap 4
2. What is the difference between Bootstrap 3 and Bootstrap 4?
3. Advantages of Using Bootstrap 4
4. Online or Offline? How should you use bootstrap 4 Online or Offline? Why?
5. Bootstrap 4 Grid System with Separated Examples
6. Bootstrap 4 Tables with structured and easy examples
7. Bootstrap 4 Buttons with structured and easy examples
8. Bootstrap 4 Cards with structured and easy examples
** Conclusion **
I hope once again this concept of bootstrap 4 cards is very cleared in your mind. After all If you fave any kind of questions then you can ask me any time without hesitation. I am here only for sharing knowledge with needy peoples. I will give you all the responses as soon as possible. Also, you can contact me on the “contact us” page.
We also have youtube channel for web designers and developers only. So Let’s Go and Subscribe Us on Youtube. Channel Name : DesignHub4u
Originally published at https://www.designhub4u.com on November 22, 2019.