0

I have a question here about creating rows and columns. I need to add 4 cards per row. And I might have N cards.

My question is: Do I need to have a

<div className="row">

for every single row? Or can I have a single row that encapsulates all the

<div className='col-sm-3'>

? From my understanding, when I use col-sm-3, I'm already saying that I'll have 4 cards per row (4 x 3 = 12).

Problem is when I use only one row to encapsulate everything it works fine. But I'm not sure about the right approach to it. Is that right? Should I have 1 <div className="row"> for every 4 columns? Or is it ok to have 20 cards in just one row? When I try having 1 row for every 4 columns it's breaking the code and it's not working properly. It displays the whole thing, but for for a fraciton of a second, then it blinks and everything disappears.

Paloma Schkrab
  • 301
  • 1
  • 4
  • 13

1 Answers1

0

Have a look at the Bootstrap documentation for more in depth explanation. As far as I understand your question, div class=“row” and inside this class you put your col-classes. So only one row is needed.

user2037412
  • 164
  • 1
  • 11