Product preview card component soultion
Design comparison
Solution retrospective
the responsiveness of mobile css media query for mobile how do I get better
Community feedback
- @ibra-sanPosted over 2 years ago
Congrats on completing the project.
-> If you mean like changing the image based on the size of the view port. Then there is not need to use a media query for that. Rather add srcset attribute to your image and set it according to your design wishes. Below is a helpful guide around 10 - 20 minutes read depending on how fast you digest the content:
https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images
This will tell you how to use srcset.
-> If you are talking about media queries in general. There is something you need to take in mind, only the styling attributes that belongs to a certain tag mentioned written inside the media query is going to affect the mentioned tag / element when the view port is changed. For example: if I set height to 20px and width to 20px, and in the media query I set width when viewport is 700px to be 10px. Then only the width is going to be affected, the height is going to be the same at 20px. A good resource for media query is the following, also a short read. https://www.w3schools.com/css/css3_mediaqueries.asp
Anyway congrats on finishing the project. Al Salam Alikum
Marked as helpful0@hamid-abdallah-mohammedPosted over 2 years ago@ibra-san Got it, Thank you so so much for your time to guide I do appreciate
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