Design comparison
Solution retrospective
first of all my page is still not responding and I've did my best to make my result match the design, the difficult thing i faced was that i didn't know how to put the items in the middle of the web page center i think it's because of the grid element, actually I'm not sure but my solution was to margin 445px for both side right and left.
Community feedback
- @hyrongennikePosted about 2 years ago
Hi @Abasalamin91,
Nice job on completing the challenge
You can center the columns by using CSS flex on the parent container in your it's the body element. Replace you body rule with the following one to center the columns in the middle of the page.
body { background-color: hsl(30, 38%, 92%); align-items: center; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; }
Marked as helpful1@Abasalamin91Posted about 2 years agoHi @hyrongennike
Thanks for your feed back, very helpful.0 - @correlucasPosted about 2 years ago
👾Hi Abas Alamin, congratulations for your first solution!👋 Welcome to the Frontend Mentor Coding Community!
Great start and great first solution! You’ve done really good work here putting everything together, I’ve some suggestions you can consider applying to your code:
You did a good work putting everything together in this challenge, something you can do to improve the image that needs to change between mobile and desktop is to use
<picture>
instead of<img>
wrapped in a div. Look that for SEO and search engine reasons isn’t a better practice import this product image with CSS since this will make harder to the image be found. You can manage both images inside the<picture>
tag and use the html to code to set when the images should change setting the devicemax-width
depending of the device (phone / computer) Here’s a guide about how to usepicture
:https://www.w3schools.com/tags/tag_picture.asp
Think about using relative units as
rem
orem
instead ofpx
to improve your performance by resizing fonts between different screens and devices.Anyhow, if we want a more accessible website, then we should use rem instead of px. REM does not just apply to font size, but to all sizes as well.✌️ I hope this helps you and happy coding!
Marked as helpful0@Abasalamin91Posted about 2 years agoHi @correlucas I'm very great full for your help, I really appreciate your time for reviewing my code. Thanks a lot.
1
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