Code Monkey home page Code Monkey logo

learn-bootstrap-4_utilities-and-components-adding-a-card's Introduction

This is the link to the lesson

LEARN BOOTSTRAP 4: UTILITIES AND COMPONENTS

Adding a Card

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

learn-bootstrap-4_utilities-and-components-adding-a-card's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.