Design comparison
Solution retrospective
If I made a mistake, please warn me!
Community feedback
- @hardy333Posted about 3 years ago
Also one thing I forgot to mention, why do you use "card-image" class name and then camel case class name "cardContent", do you they have some semantic meaning ? I suggest to choose one of them and use it all the time it will be more consistent. You also can check out BEM naming system.
Marked as helpful4 - @hardy333Posted about 3 years ago
HI Han.
On desktop view card looks great. using linear-gradients and image as background was very cleaver idea to create overlay effect -- good job.
On Tablet and smaller sizes there are some issues:
- On Tablet cardContent and card-iamge are not proportionally scaled and image becomes very small compared to cardContent, that is becouse your cardContent div has way more content in it then card-image (which is empty) so flexbox shrinks your card-image wayyyy more then cardContent. There are different methods how to solve this kind of problem. I suggest to watch this video.
- On mobile view card is too close with edges of browser, so use paddings or margins.
- I highly suggest not to use fixed height value for elements, in this case for your card. Instead let your card content resize their container by their own, but if you want your container to have same default height use min-height property instead of height.
Marked as helpful4@creatorindiePosted about 3 years ago@hardy333 Thanks for the suggestions! Next time i'll care about other view scales. Also I think I would to like use camel case :D
0 - @darryncodesPosted about 3 years ago
Hi Han
Great effort, well done!
- you could change
<section class="banner">
to<main class="banner">
. And it's best practice for accessibility to only use one<h1>
in your design. - semantic html
- heading hierarchy
Happy coding!
Marked as helpful1@creatorindiePosted about 3 years ago@darryncodes Thanks for the suggestion! I'll keep in my mind.
0 - you could change
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