Design comparison
Solution retrospective
Hi, I would like some feedback on this project :) especially with this two queries:
- how do i put the second price (169$) in the middle?
- how do i define a different image to shown only on mobile?
Community feedback
- @yishak621Posted almost 2 years ago
Congrats for completing the project....but u should work on grid display layouts and the answer to ur question is to put items in the center use
flex
property which has multiple values to put items in the center horizontallyjustify-items
andalign-items:center;
....and also the second question to add different images for mobile and pc version usepicture
element that hassource
that accepts two(or more) different srcsets and apply them to a desired width (1200w means px in the below example)<div class="container"> <div class="image"> <picture> <source srcset="images/[email protected] 750w, images/[email protected] 1200w" /> <img src="images/[email protected]" /> </picture> </div>
Marked as helpful0 - @CLRwebsPosted almost 2 years ago
Hey hila, You can put the new and the old price within the same <div>, and then you can do : display: flex; align-items: center;
For the mobile version (and on the desktop version too) you can make a <div> for it and set it as a background. I hope I helped you a little bit, have fun with your codes!
Marked as helpful0
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