Currently, I am utilizing bootstrap cards in my project. The number of cards within a card-deck varies dynamically. However, I have encountered an issue where each card should occupy a width of col-md-4
(33%). Everything works fine when there are more than one card, but the problem arises when only a single card is present, as it fails to adhere to the 33% width based on col-md-4
.
You can view a sample demonstration here: https://jsfiddle.net/2o09b4te/. Try removing cards one by one until only one remains.
Do you have any insights into what might be causing this discrepancy?
With 3 cards: display is correct https://i.sstatic.net/DTarP.png
With 2 cards: display is correct https://i.sstatic.net/1aL1q.png
With 1 card: display is incorrect https://i.sstatic.net/FB50y.png