Responsive landing page using CSS
Design comparison
Solution retrospective
It was a little difficult to make the project responsive since I haven't used plain CSS in a while.
Community feedback
- @prantiknoorPosted over 2 years ago
Hey @introvertedailurophile🙂. Good work, but there are some issues.
You are given 2 images (for desktop & mobile). But you only used the desktop image.
<img class="left" src="images/image-product-desktop.jpg" alt="Perfume bottle" />
You can use both using
picture
based on screen size. as an example:<picture> <source media="(min-width: 800px)" srcset="./images/image-product-desktop.jpg" /> <img src="./images/image-product-mobile.jpg" alt="A image of perfume" class="product-image" /> </picture>
This code will change the image when the screen will be 800px or bigger.
Marked as helpful1@introvertedailurophilePosted over 2 years agoHey @prantiknoor, I had no idea how to do that so I figured out something on my own. Thanks a lot for your tip!! Is this a part of semantic HTML markup? I read about it only when I was editing the READme file. So didn't use it in any of my projects yet.
0@prantiknoorPosted over 2 years ago@introvertedailurophile Yes, it is a part of semantic HTML markup. It's very cool. 😊
0 - @Sowmo0509Posted over 2 years ago
Heyy Ruqayya! Nicely done! I understand it's been a while you haven't worked with plain CSS, but there's something you should look at. Check the button on desktop preview. The texts are breaking, that's a problem, and the gaps between
h1
andp
seems too much on mobile devices. Other that these, awesome!Marked as helpful1@introvertedailurophilePosted over 2 years agoHello! Thanks a lot for your feedback! I will look into those issues and fix them :)
1 - @afaiz-spacePosted over 2 years ago
Hey @introvertedailurophile,
- Replace
width:40%;
withwidth:40rem;
in the center class.
1@introvertedailurophilePosted over 2 years agoHey, thanks for the tip. Could you please tell me what the difference is? I am fairly new to coding so I get confused when it comes to using units. Appreciate the help!
0 - Replace
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