@correlucas
Posted
👾Hello Abbas Roholamin, congratulations for your first solution and 😎 welcome to the Frontend Mentor Coding Community!
Answering your question:
To make this container responsive you need to use max-width: 320px
to allow it to contract, and never use width
if you want an element behaving responsive.Note that the difference between these two properties is that width
is fixed, example, width: 320px
is an container that doesn't get bigger or smaller than 320px
but max-width: 320px
have the maximum of 320px
and can contract when the screen scales down and adjust its size.
If you’re not familiar to media queries
and responsivity
, here’s a good resource to learn it:
https://www.w3schools.com/css/css_rwd_mediaqueries.asp
👋 I hope this helps you and happy coding!
Marked as helpful