Design comparison
SolutionDesign
Solution retrospective
What challenges did you encounter, and how did you overcome them?
The image in pc and mobile version is different, instead of placing the image directly I used it as background.
What specific areas of your project would you like help with?The detail, I always want to improve the layout pixel by pixel.
Community feedback
- @haquanqPosted 4 months ago
Hello @codigotin,
Nice work, when i preview you solution live it looks good and similar to the given design.
About HTML
- Avoid using
div
whenever possible (div
has no semantic meaning - choosediv
when there is no other element or for styling purpose). Consider using more semantic element such assection, article,..
to wrap the content (depend on the content - is it a section or article?). - Page must have one
h1
to give the page a title (in your case you can switchh2
toh1
). Remember to never skip heading level (likeh2
toh4
or like you just have anh2
). - Use
img
for the product image since this is an meaningful image of the product (usebackground-image
for decoration images/patterns) and provide a descriptivealt
attribute. - There is no need to wrap
.title
and.description
insidediv
(as i said above,div
provide no semantic). Leave the elements as it is since they do not need any special layout control (like flexbox) and they stay the same vertically to the left.
About CSS
- Never use fixed
width, height
on element (unless it really need it), this make your element less responsive, work aroundmin/max-height, min/max-width
instead. - Because you are using fixed
width, height
it makes the layout shift in media queries too rushed (check out my solution) - Consider practice using BEM for naming classes.
About improve the details, you need to create reusable component (classes) such as typo styles (from Figma) and work from it to spacings between elements.
That is for now, have a nice day and happy coding !!!
0 - Avoid using
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