I've recently been making a React JS app, and I've found a CSS problem that kind of bothers me. It's kind of hard to explain.
In the link below is the picture, and in there you can see that sometimes the "add to cart" button is higher up than the base of the container box in some cards, then down correctly on the baseline in others. The same is for the BUY button and the price text. And I want to try and make this all even so that all boxes are aligned evenly with each other.
This is my CSS code for the cards, which is named products.css
:
.wrapper {
margin: 0 auto;
width: 90%;
}
.cards {
list-style: none;
margin: 0;
padding: 0px;
}
.cards li {
border: 2px solid #ffb485;
border-radius: 5px;
background-color: #e8e8e8;
color: #fff;
flex: 1 1 200px;
}
.price-colour {
color: black;
}
.cards h2 {
background-color: #ffb485;
margin: 0;
padding: 10px;
}
.cards p {
padding: 10px;
}
.flex {
display: flex;
flex-wrap: wrap;
margin: 0 -10px;
}
.flex li {
flex: 1 1 200px;
margin: 10px;
}
If you need anymore information, or if my question was poorly phrased, please tell me. Any help is very much appreciated. Thank you!
` elements the same height.
– Andrew Morton Apr 15 '21 at 16:35