Design comparison
Solution retrospective
I am proud of the fact that I got the responsiveness down for the project
What challenges did you encounter, and how did you overcome them?I had issues getting the text from the bottom to the right side, I then had to google search how I can use flex to get it on the right side.
What specific areas of your project would you like help with?Should the text scrunch up and then move to the bottom is that correct
Community feedback
- @correlucasPosted about 2 years ago
👾Hello @mverma45, Congratulations on completing this challenge!
Your solution its almost done and I’ve some tips to help you to improve it:
1.Using
<picture>
you’ve more control over the elements and its better than using the product image as<img>
orbackground-image
. Look that for SEO and search engine reasons it isn't a better practice to import this product image with CSS since this will make it harder to the image. 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
2.I saw that you’ve used
flexbox
to place the content and create the layout. I think the best way to build this component with two columns is by usingGRID LAYOUT
since it is simpler to manage the columns and then create the media query for mobile. Here’s the steps to create it withgrid
create the main block to hold all the content (you can use<main>
to wrap), set itswidth
asmax-width: 900px
(it's the container size) anddisplay: grid
/grid-template-column: 1fr 1fr
(this means that your component will have two columns with 50% of the container width each thats 450px). To manage the column with the text use flexbox andgap
to give it the spacing between the texts or usepadding-bottom
to separate them. Then to create the mobile version, all you need to do is to change the container flow vertically withgrid-template-column: 1fr
.✌️ I hope this helps you and happy coding!
Marked as helpful0@mverma45Posted about 2 years ago@correlucas Thank you for your suggestions. I implemented the suggestions but I couldn't get the grid to work? It doesn't seem to be doing anything any ideas?
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