Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use bootstrap cards next to each other?

I am using 'class="card-group"' in bootstrap to make four cards to appear next to each other or to appear together in somethings like a row but i can not make it.

like image 646
Yohana Avatar asked Apr 04 '17 13:04

Yohana


2 Answers

You can also use bootstrap's grid, make a row and divide it, example :

<div class="row">
    <div class="col-sm-6">Card 1</div>
    <div class="col-sm-6">Card 2</div>
</div>

See here for more details on this: Grid system - Bootstrap

like image 53
Lalati Avatar answered Sep 23 '22 01:09

Lalati


Just add .card {display:inline-block;} to make them display in a line.

This is the official way according to the docs: https://v4-alpha.getbootstrap.com/components/card/#card-columns

like image 40
Rachel S Avatar answered Sep 25 '22 01:09

Rachel S