This is the link to the lesson
Bootstrap also has a card component that serves as a container for smaller customized content. Card components are often grouped together to display a collection of similar content in manageable chunks. We can draw a comparison of the card component to playing cards in deck — in both cases, there are cards grouped together and each one contains something different.
Below is an example modified from Bootstrap’s card documentation:
<div class="card">
<img class="card-img-top" src="placeholder.jpg" alt="card example image">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">Card description goes here.</p>
<a href="#" class="card-link">Link to somewhere.</a>
</div>
</div>
Let’s highlight a few key points from the example:
- To make a card component we need to assign a class of "card" to an element.
- Inside the card component, there are two children, an and a element.
- The has a class of "card-img-top" which adds styling and formatting to the image.
- The has a class of "card-body" which adds a section with default padding.
- The content inside the card body all have classes with "card-{value}" which adds styling to these elements specific for Bootstrap cards.
- By default, this card will take up the entire width of its parent element.
Let’s add some of our own cards, remember to check Bootstrap’s card documentation for more customizations!
memory jog /c/Users/glads/Documents/PROJECTS_AT_CODECADEMY/LEARN-BOOTSTRAP-4_UTILITIES-AND-COMPONENTS-Adding-a-Card