Design comparison
Solution retrospective
i hard difficulty in styling the mobile view but finally i made it
Community feedback
- @0xabdulkhaliqPosted over 1 year ago
Hello there 👋. Congratulations on successfully completing the challenge! 🎉
- I have other recommendations regarding your code that I believe will be of great interest to you.
BODY MEASUREMENTS 📐:
- Use
min-height: 100vh
forbody
instead ofheight: 100vh
. Setting theheight: 100vh
may result in the component being cut off on smaller screens.
- For example; if we set
height: 100vh
then thebody
will have100vh
height no matter what. Even if the content spans more than100vh
of viewport.
- But if we set
min-height: 100vh
then thebody
will start at100vh
, if the content pushes thebody
beyond100vh
it will continue growing. However if you have content that takes less than100vh
it will still take100vh
in space.
.
I hope you find this helpful 😄 Above all, the solution you submitted is great !
Happy coding!
Marked as helpful1 - @HassiaiPosted over 1 year ago
Every html must have <h1> to make it accessible. Always begin the heading of the html with <h1> tag wrap the sub-heading of <h1> in <h2> tag, wrap the sub-heading of <h2> in <h3> this continues until <h6>, never skip a level of a heading.
For a responsive image that will change the images at different screen sizes use the picture tag. For more click here
For responsive content, replace the width in .container with
max-width
, using the max-width you only need one media query for the mobile design with a reduce max-width value.max-width:25rem
. This will reduce the as the screen size reduces and increase as the screen size increases until it reach 25rem.There is no need to give .container-info and img-container a height value rather give .container-info a padding value for all the sides, this will prevent the content from overflowing on smaller screens.
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful1@Pe-te-rPosted over 1 year ago@Hassiai Thankyou for your advice. On my next project i will consider your advice regarding use of max-width instead of a fixed width
0
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