Design comparison
Solution retrospective
Hello! I'd love to hear any feedback about the organization/legibility(?) of my code. I'm really new and am not sure what to compare it to for the purpose of self-evaluation. Also, any feedback on how I can get my solution to better match the design is very welcome! For my first few solutions the scale of the card was a bit off. Thanks!
Community feedback
- @natashaplPosted about 2 years ago
Hi Casey. Your solution looks nice! I have a couple of suggestions per your question:
-
I recommend that when you upload a solution, you click the "View Reports" button if it shows any Accessibility or HTML issues. This report gives valuable insight on things you can fix or improve.
-
For the
article class="image"
, I recommend you add the source image as a background image using CSS rule in your index.css stylesheet rather than adding the source in the markup. That source tag causes your HTML to be invalid.
Here's an example of how that would look:
.image { position: relative; background: url(./images/image-header-mobile.jpg) no-repeat 0 0; height: 100%; }
-
It's not valid HTML to place a
p
tag inside anh2
. Use aspan
instead and if you want you want the element in its own line applydisplay: block;
to the span. -
Consider changing the width of
.container
towidth: 1080px;
for desktop and then adding anoverflow: hidden;
to keep the content from flowing outside the rounded corners. I also suggest you change the height of.container
toheight: 68vh;
.
I hope this is helpful. :)
Marked as helpful1 -
- @correlucasPosted about 2 years ago
👾Hello Casey, Congratulations on completing this challenge!
You need to fix the
container size
that is a bit off, this challenge uses the standard container size that ismax-width: 1110px
.To make the image have a better fit inside of it, make the component image responsive with
display: block
andmax-width: 100%
(this makes the image fit the column/div size) and respect the component size while it scales down. To make it crop while scaling useobject-fit: cover
.img { display: block; object-fit: cover; max-width: 100%; }
The way you’ve applied the purple color is fine, but if you want the exact color tone of color of the challenge designs, you need to use
mix-blend-mode
to make the color blend between the image and the background-color of the container. See the steps below to apply to theimg
orpicture
selector:img { mix-blend-mode: multiply; opacity: 75%;}
✌️ I hope this helps you and happy coding!
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