Topic: Missing .card-block padding styling

johnpitchko free asked 5 years ago

Hello, I'm trying to add some basic cards, however I noticed that the .card-block class does not add the padding values as indicated in the documentation on the site. I tried using both the SASS and CSS versions in the MDB package. Neither file includes styling for .card-block padding. I then downloaded and applied the .compiled.min.css style from the MDB documentation site, and magically the .card-block padding style was applied and the card works correctly. This leads me to believe that the 3.0.1 release, for whatever reason, is missing some basic styles. Can anyone else confirm?

Magdalena Obalska free answered 5 years ago

John, the examples on our website are for MDB latest version and you should expect mentioned .card-block padding if you're using MDB 4.3.2. MDB 3.0.1 styles are a bit different, so you can just add this padding manually, as you did.

johnpitchko free answered 5 years ago

Ok I posted this gist which I think demonstrates the problem. Granted it may not be using the latest version because I'm linking to MDBootstrap CSS and JS hosted by CDN. When I run that code, the cards are displayed, but there is no padding in the .card-block class. I expect .card-block to have the padding: 15px attribute, which I manually added in the third card. This is how cards look in the examples on your website.

Magdalena Obalska free answered 5 years ago

Hey, could you paste here some code? It would be much easier to verify your guesses.

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.


Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No