Design comparison
Solution retrospective
Able to understand the concept of responsive image and will try design layout more responsive
What challenges did you encounter, and how did you overcome them?showing different images to 2 different view port and to do that learned about scrset and sizes , pciture tag
What specific areas of your project would you like help with?Need help regarding how to responsively design these kind of design in a better way , and how can i use scrset , sizes and picture tag for better responsive design
Community feedback
- @kaamiikPosted 25 days ago
Hi. Congrats for doing this challenge. I noticed some points I wanna mention:
- In your
picture
usemin-width
inrem
instead ofpx
.
- There should be only one
h1
in your page because It is your page title and we only have one title. and the price I think is not a heading and you can simply usep
tag for price number.
- Try to use a proper CSS reset at the start of your CSS style. Andy Bell and Josh Comeau both have a good one. You can simply search on the internet to find them.
- Your
font-size
andmax-width
should be inrem
unit notpx
. You can read this article about it and why you should not usepx
as a font-size.
- Never limit your width and height in a container or element or tag that contains text inside. When you limit the width and height of elements containing text, you risk the text being cut off, overflowing, or becoming unreadable, especially on smaller screens or when the text dynamically changes. It's generally better to allow the container to adjust its size based on its content or set a flexible size that can adapt to different screen sizes and text lengths. You only need
max-width
here because it prevents elements from stretching beyond a certain point, keeping them visually appealing across different screen sizes. It ensures your design remains adaptive and doesn't get too wide on larger screens.
Marked as helpful1 - In your
- @armson45Posted 26 days ago
Hey there! Maybe you should try do mobile first.
-
In your
card-body-price
you've put twoh1
tags, it makes sense in the title but not as a price, instead use aspan
or ap
tags. -
The use of the
picture
is good and the problem with the image is that you have this:.card-img img { width: 100%; height: 100%; }
the actual problem is theheight
, it makes that the image always takes the 100% of the space in the parent available, so when you go in small viewports the image covers all the card so just delete that line or put it inauto
but it may generates another problem.
As I say before, try the mobile first. It's easier to take care of responsive that way.
Everything else looks good for me .
Have a nice code! :)
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