I recently started to learn html and css. I have problem with positioning 2 div horizontally
My code:
HTML:
<div class = "cart__itemwraper">
<div class = "cart__item__image">
<img src="images/laptop.png" style = "width: 100%; height: 100%;"/>
</div>
<div class = "cart__item__desc">
<div class = "cart__item__name">
<span>name name</span>
</div>
<div class = "cart__item__price">
<span>price price</span>
</div>
</div>
<div class= "cart__item__counter">
<span> counter</span>
</div>
</div>
CSS:
.cart__itemwraper{
width: 100%;
display: flex;
}
.cart__item__image {
width: 20%;
background-color: red;
}
.cart__item__desc {
width: 40%;
display: flex;
background-color: #814ce4;
}
.cart__item__name {
background-color: greenyellow;
width: 100%;
}
.cart__item__price {
width: 100%;
background-color: #e44caa;
display: flex;
align-items: flex-end;
}
.cart__item__counter{
width: 40%;
background-color: yellow;
display: flex;
align-items: flex-end;
justify-content: flex-end;
}
I would like to move the price to the position marked with the arrow in my using flexbox screenshot. Can someone tell my how i can do it?
