@correlucas
Posted
πΎHello Hicham Maachou, congratulations for your first solution! π Welcome to the Frontend Mentor Coding Community!
I did some fixes to your code:
The correct size for the container is max-width: 900px
(to have the correct size and also make it responsive)
.product-container {
background-color: hsl(0, 0%, 100%);
border-radius: 10px;
/* height: 70%; */
max-width: 900px;
/* width: 60%; */
overflow: hidden;
display: flex;
justify-content: space-between;
}
Note that there's no need to use height
here, because since you set a height
for an element, this means that this element will grow until a certain point and after that the inner content (as texts or images) will start to pop out the element due its fixed height, so isn't necessary to set the height
the container height comes from the elements, its paddings and height.
βοΈ I hope this helps you and happy coding!
Marked as helpful
@hichammaachou
Posted
@correlucas thank you sm that was really helpful!