Frontend Mentor - Huddle landing page with single introductory section
Design comparison
Solution retrospective
Please for the image in the main section. What CSS unit do you advise should be used, and do you think the use of percentages will do?
Community feedback
- @adityaphasuPosted over 1 year ago
Hi! Good job on the challenge!
Using
max-width: 100%
is actually quite the most common way to make the images responsive on a website! It is usually used along withheight: auto
so that the image maintains the aspect ratio and scales proportionally.The choice of units depends on the specific design requirements, here in this challenge we want the image to scale proportionally according to screen size so
%
will do here. (some other cases might include keeping the width of the image fixed so there we would use something likerem
).I hope this cleared your doubts! Happy coding!πΊπ»
Marked as helpful0@John-developer-18Posted about 1 year agoThanks a lot for the advice. I am grateful @adityaphasu
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