Design comparison
SolutionDesign
Solution retrospective
Hey guys🫡,
I would be very happy when some of you check my code. All suggestions for improvement are welcome. I wrote it in SCSS. You can also find the SCSS-file in my repository.
Thanks, I am grateful for any help 🤝
Community feedback
- @faisalahmed11Posted over 1 year ago
Hi there @Rhinozer0s, here are some suggestions from my side.
//replace you body{ } styles with body { //width: 100%; min-height: 100vh; background-color: hsl(233, 47%, 7%); display: grid; place-content: center; } // and your @media query main{ } styles with .main { max-width: 75rem; display: grid; grid-template-columns: repeat(2, 1fr); margin-inline: 1rem; //border: 0; border-radius: 8px; overflow: hidden; } // and also, replace your main.picture img{ } styles with main .picture img { display: block; width: 100%; mix-blend-mode: multiply; filter: contrast(0.65); height: 100%; object-fit: cover; }
above improvements are especially good for responsiveness.
Marked as helpful0@Rhinozer0sPosted over 1 year agoThanks @faisalahmed11,
but why are you removing the
width
for the body? Theobject-fit
advice was a good one!0@faisalahmed11Posted over 1 year ago@Rhinozer0s, according to my knowledge by default block-level elements have width:100%, and here body {} is also a block-level element.
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