I'm currently iterating through products using the map function, but I'm having trouble getting the justify-content-around property to apply. I am working on a React project with Bootstrap 4 integrated.
Below is the code snippet:
{props.products.map((item) => {
if ( item.inCart ) {
return (
<div className="d-flex justify-content-around w-100" key={item.id}>
<button>remove</button>
<div>
<h5>{item.name}</h5>
</div>
<div>
<h5>{item.price.toLocaleString('ar-EG')}</h5>
</div>
<div>
<h5>{item.number.toLocaleString('ar-EG')}</h5>
</div>
<div>
<h5>{(item.number * item.price).toLocaleString('ar-EG')}</h5>
</div>
<hr />
</div>
);
}
The display flex class seems to be applying, however the justify-content-around property is not taking effect and there is no margin between the elements.
Is there a way to make them display with justify-content-around properly? Please advise!