Design comparison
Solution retrospective
I couldnt make the inage responsive and i still think its not perfect
What specific areas of your project would you like help with?resizing the image on different screens
Community feedback
- @DylandeBruijnPosted 4 months ago
@masha-a-m
Hiya! π
Congratulations on your solution, it looks very close to the design! I can tell you put a lot of effort into it.
Things you could improve βοΈ
-
Try experimenting with the CSS layout tool Flexbox, it will help you greatly structuring elements on your webpage.
-
You could add a
min-height: 100vh
to yourbody
element so it takes up the full height of the viewport while still being able to grow when the content inside it grows. -
Try experimenting with CSS variables, they help you make your CSS values more reusable across your code.
-
Try using using relative CSS units like
rem
andem
they make your layout more adaptable. -
You donβt need to put
width: 100%
onblock
elements, they already take up the full width of their parents by default. Your.content
element already is ablock
element, it's not necessary to putdisplay: block
on it. -
Try centering your recipe using Flexbox instead of
margin
andpadding
.
I hope you find my feedback helpful! π
Let me know if you have more questions and I'll do my best to answer them. πββοΈ
Happy coding! π
Marked as helpful0@masha-a-mPosted 4 months ago@DylandeBruijn thank you very much. this very helpful!
0 -
- Account deleted
- use
max-width
for.content
in this case you can usemax-width: 800px;
which looks equivalent to the orginal design. - for the image since it is in a container use percenteage instead px(pxiel). for example:
.content img { width: 100%; }
- you can finally remove Media Queries
Marked as helpful0Account deleted@masha-a-m your welcome.
Marked as helpful0 - use
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