Design comparison
Solution retrospective
Hey! Happy Big Thursday Everyone!
Learned a lot about CSS box-sizing: border-box;
with this challenge. I had issues with the vertical scroll bar appearing on the browser, even tho the min-height:
was set to 100vh
. My code was missing the box-sizing: border-box;
property.
And of course, ANY feedback would be greatly appreciated. π
Community feedback
- @denieldenPosted about 2 years ago
Hi Cornflakes, congratulations on completing the challenge! π
Some little tips:
- use
main
tag to wrap the card and improve the Accessibility - use
article or div
tag instead ofmain
to the container card
Great job, you have improved and the code is nice and clean!
Hope this help! Happy coding π
Marked as helpful1@CornflakesPlusPosted about 2 years ago@denielden Hey Deniel! Thanks for the Feedback.
1@denieldenPosted about 2 years ago@CornflakesPlus You are welcome and keep it up π
0 - use
- @miranleginPosted about 2 years ago
Hi Cornflakes,
you did a good job on this example and i could only suggest couple of minor tweaks:
- you can try setting
display: block; max-width: 100%
on image and removepadding: 0 .3rem
, first will make sure that the image don't extend beyond the parent element and second will correct wrong aspect-ratio - fine tune line-heights on textual elements to closely match design
- remove footer from page flow with
position: fixed; bottom: 0
so when you generate your screenshot it will match design even more
Keep coding! Cheers
Marked as helpful1@CornflakesPlusPosted about 2 years agoHey Miran! Excellent feedback. I loved the Footer part :)
I'll surely implement and remember this for future projects. Thank you so Much!
0 - you can try setting
- @correlucasPosted about 2 years ago
πΎHi Cornflakes, congrats for your new solution!
Great solution and great start! By what I saw youβre on the right track. Iβve few suggestions to you that you can consider to add to your code:
Your component is perfect, but is not responsive yet, this is due the
fixed width
you've applied to the container.Look both
width
andmax-width
the main difference between these properties is that the first(width) is fixed and the second(max-width) isflexible
, for example, a component withwidth: 320px
will not grow or shrink because the size will be ever the same, but a container withmax-width: 320px
ormin-width: 320px
can grow or contract depending of the property you've set for the container. So if you want a responsive block element, never usewidth
choose ormin-width
ormax-width
.Note that there's no need to use
height
here, because since you set aheight
for an element, this means that this element will grow until a certain point and after that the inner content (as texts or images) will start to pop out the element due its fixed height, so isn't necessary to set theheight
the container height comes from the elements, its paddings and height.βοΈ I hope this helps you and happy coding!
Marked as helpful1@CornflakesPlusPosted about 2 years agoHey Lucas! Thank you for the Feedback. Regarding the
width
andmax-width
, I've rechecked my CSS style sheet, and seems like I've usedmax-width
notwidth
. Is there something else you might be referring to?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