# Bootstrap cards not lining up

**URL:** <https://forum.freecodecamp.org/t/bootstrap-cards-not-lining-up/359689>\
**Category:** General\
**Created:** [March 16, 2020, 11:19pm UTC](https://forum.freecodecamp.org/t/bootstrap-cards-not-lining-up/359689 "2020-03-16T23:19:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sabbyiqbal](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sabbyiqbal/32/104864_2.png) [@sabbyiqbal](https://forum.freecodecamp.org/u/sabbyiqbal)\
**Post date:** [March 16, 2020, 11:19pm UTC](https://forum.freecodecamp.org/t/bootstrap-cards-not-lining-up/359689/1 "2020-03-16T23:19:07Z")

</div>

I am using a constructor function to create a series of graphs and so I would have expected all of them to look exactly the same (format-wise, not data-wise). But only 1 of my graphs has the correct dimensions. The rest are too wide.

If you look here, you can see that only the “Punjab” card has the correct dimensions. I want the other cards to match it: [https://data-driven-pakistan-data-stories.netlify.com/](https://data-driven-pakistan-data-stories.netlify.com/)

Code: [https://github.com/SabahatPK/Data4Pakistan\_SlopeGraphs](https://github.com/SabahatPK/Data4Pakistan_SlopeGraphs)

I tried invoking the other errant graphs with data from “Punjab” just to make sure it wasn’t some data-point that was pushing the boundaries of the card. But that did not change anything.

I assume this has something to do with CSS but I cannot tell what.

---

<div class="post-metadata">

**Author:** ![lasjorg](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lasjorg/32/280761_2.png) [@lasjorg](https://forum.freecodecamp.org/u/lasjorg)\
**Post date:** [March 17, 2020, 1:58am UTC](https://forum.freecodecamp.org/t/bootstrap-cards-not-lining-up/359689/2 "2020-03-17T01:58:36Z")

</div>

They all have different widths. Can’t you just give the `.card` class `width: 100%`.

Edit: BTW, you are also using different `col` classes on them.

---

<div class="post-metadata">

**Author:** ![sabbyiqbal](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sabbyiqbal/32/104864_2.png) [@sabbyiqbal](https://forum.freecodecamp.org/u/sabbyiqbal)\
**Post date:** [March 17, 2020, 2:19pm UTC](https://forum.freecodecamp.org/t/bootstrap-cards-not-lining-up/359689/3 "2020-03-17T14:19:13Z")

</div>

Thanks @lasjorg, I updated the `.card` width to be 75% and that gave me the format I wanted.

And thanks for catching the `col` discreprancy. Updated all to be `"col-sm-*"`

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 7:32pm UTC](https://forum.freecodecamp.org/t/bootstrap-cards-not-lining-up/359689/4 "2021-06-01T19:32:54Z")

</div>

Closed on June 1, 2021, 7:32pm UTC


