Design comparison
Solution retrospective
I'm facing an issue : Responsive is not working below 780px of page width and I can't figure out why.
Community feedback
- @Nishkarsh01Posted over 3 years ago
I saw your front-end challenge and the issue you were facing, and I created a pull request to help you understand.
I updated the Html and CSS Code a bit in order to make the webpage responsive below 720px;
- I created a div with class
.center
to wrap & center the entire content. - Apart from that I made use of relative units of measurement using % and rem.
- When the viewport width hit 720px I changed the
flex-direction
of the flex-container (.container) tocolumn
and accordingly adjusted the width of the mockup image.
1@Nishkarsh01Posted over 3 years ago@Nishkarsh01 you could expand on the idea and make your code better.
Also, try and learn about:
- Using comments in HTML and CSS.
- Separation of Concerns in HTML and CSS.
- Learn more about relative units of measurement in CSS like rem, em, %, vh, vw, etc.
- Learn about utility classes and reusability of code.
- Also try and avoid repetition of code.
1@pierre-pellegrinoPosted over 3 years ago@Nishkarsh01 Hey ! Thanks a lot for your answer !
I am reading what you changed on the pull request. As I am really a beginner I don't understand everything at first reading but I'll be working on it until I fully understand.
-
I didn't know about this
.center
technique, as I understood it includes the whole page, so you can setup a responsive behaviour more easily ? It seems really nice, I will give it a try ASAP. -
I'm also surely giving it a look, I don't know how to use them properly, still need to practice !
-
Wow, I thought what I was setting up when viewport width was below 1250px automatically applied in my
@media screen and (max-width: 720px)
media query !
Once again thanks a lot, it will really help me to improve !!
0 - I created a div with class
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord