Skip to content
Advertisement

React Boostrap CardDeck does not align horizontally

I am new with React and I am trying to display three cards in a row but they do not align horizontally, they are vertically (from top to bottom). I tried using cardDeck or cardGroup, but they do not work. Below is the code

JavaScript

Also, I did a sass file to import in the code above but it seems it does not work. This is the simple code fo the sass file:

JavaScript

In addition, this is the itemList where I do the map of the items:

JavaScript

Last, this is the itemListContainer where I did the promise:

JavaScript

I hope someone could solve it. Thanks!

Advertisement

Answer

Apply the class .clem in your ItemList main div like blow. So that It will apply the horizontal row style for your Card Container.

JavaScript

Otherwise you can use Card Group for your requirement. But <CardGroup> should not in the repeated section. It should be placed on common where currently we have applied class clem. Refer the details here

Advertisement