Design comparison
Solution retrospective
Hello, this is my solution, I would like to know what do you think about it, and what are the parts that need to be changed or improved, I didn't add the responsiveness to it, I thought about using min-width[25%] and max-width[80%] (without using media query since the challenge said that the card doesn't shift) to not let the card shrink when the screen size shift to a mobile size but it didn't work, any suggestion on this is appreciated.
Community feedback
- @grace-snowPosted almost 3 years ago
This looks broken for me on mobile.
Here are some more tips
- don’t position relative or hide overflow hidden on body and html. Very bad things happen
- center component on page using flex or grid properties and min height 100vh on a wrapping element / body. Do not use position relative and transform.
- a little padding on that wrapper or margin on your component will prevent the content hitting screen edges
- max width in rem, no width, no height on this card
- css reset should be setting the img to display block and max-width 100%
- you are hiding the most important content on this page for assistive tech and search engines - alt text needed on that image
- never have font size in px, use rem
- why is footer display none?
Marked as helpful1@AmiraBenguegaPosted almost 3 years ago@grace-snow thank you for this really informative feedback, I really appreciate it. and I'll fix the parts that you mentioned
- the website is broken on the mobile screen because I set the width& height of the card proportional to the screen size(vw/vh) I thought this way it would be responsive without media query.
- for the footer I just wanted to omit the attribution in it so that the page match the design, maybe I should have just removed the attribution div.
0@grace-snowPosted almost 3 years ago@AmiraBenguega this challenge doesn’t need a media query. Max width is all you need
Marked as helpful1 - @sb101-beepPosted almost 3 years ago
You can probably make the .main width and height a fixed size, I don't think they need to vary on this one. Other than that looks great :-)
Marked as helpful0@grace-snowPosted almost 3 years ago@sb101-beep there is no reason to use fixed height or width in this. Just a max-width.
Setting explicit height in particular is unnecessary and either of these can introduce overflow bugs
Marked as helpful1
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