Design comparison
Solution retrospective
I am proud I was able to remember most of what I had learn in the classes so when I was stuck on a problem I had an idea of how to solve it.
Next time I will try to make my web page responsive.
What challenges did you encounter, and how did you overcome them?The hardest part was changing the style of the lists and have two different styles. The community helped by providing explanations.
What specific areas of your project would you like help with?I would like an easy explanation of how to make a web page responsive. I still don't quite get it.
Community feedback
- @steveostlerPosted 4 months ago
Your solution looks good but does not display well on smaller screens. Try not to use width and heights on containers and let them expand to fit. Try taking the width and height rules off the gross_boite class and adding max-width:900px Take the width rule off the jolie-boite class On the img rule add width:100% and take off the margin rules
body{ background-color: hsl(30, 54%, 90%); font-family: Outfit; font-weight: 400; font-size: small; color:hsl(30, 10%, 34%); margin: 50px; font-size: 16px; } .grosse-boite{ background-color:hsl(0, 0%, 100%); max-width: 900px; /* width: 720px; */ /* height: 1525px; */ border-radius: 25px 25px 25px 25px; margin: auto; } img{ width: 100%; border-radius: 15px 15px 15px 15px; /* margin-top: 45px; */ /* margin-left: 45px; */ /* margin-right: 45px; */ } h1{ font-family: Young serif; font-weight: 400; margin-left: 45px; margin-right: 45px; color: hsl(24, 5%, 18%); } p{ font-family:Outfit; font-weight: 400; font-size: small; margin-left: 45px; margin-right: 45px; } .jolie-boite{ background-color: hsl(330, 100%, 98%); /* width: 630px; */ height: 140px; padding-top: 0.005%; border-radius: 5px 5px 5px 5px; margin-left: 45px; margin-right: 45px; } h3{ color:hsl(332, 51%, 32%); margin: 20px; height: 10px; border: 5px; margin-left: 45px; margin-right: 45px; font-weight: 600; } ul{ list-style: none;} li:before{ display: inline-block; width: 2em; margin-left: -1em; margin-bottom: 0.5em; } li.prep-list:before{ content: "•"; color:hsl(332, 51%, 32%); font-size: 16px; } li.ing-list:before{ content: "\25AA"; color: hsl(14, 45%, 36%); margin-left: 15px; font-size: 16px; } h2{ font-family: Young Serif; color: hsl(14, 45%, 36%); margin-left: 45px; margin-right: 45px; font-weight: 400; } ol{ list-style:none; counter-reset: li; margin-left: 65px; margin-right: 65px; } ol li::before{ font-weight: 600; font-size: 16px; display: inline-block; margin-left: -2.5em; margin-right: 0.5em; content: counter(li)". "; color:hsl(14, 45%, 36%); display:block; margin-bottom: -25px; line-height: 2rem; font-size: 16px; } li {counter-increment : li} table{ border-collapse: collapse; width: 100%; margin-left: 45px; margin-right: 45px; margin-bottom: 50px; } tr{ border-bottom: 1px solid hsl(30, 18%, 87%); } tr.last-child{ border-bottom: 0; } th{ font-weight: 500; text-align: left; color:hsl(30, 10%, 34%); padding-left:20px; } td{ font-weight: 600; color: hsl(14, 45%, 36%); padding:10px } .last-td{ border-bottom:none } hr{ border: 0.5pt solid hsl(30, 18%, 87%); margin-left: 20px; margin-right: 20px; }
Marked as helpful0@PennymrtnPosted 4 months ago@steveostler I just made the corrections you provided. It works wonders! Thank you so much for your help and for answering that quickly!
0 - @DylandeBruijnPosted 4 months ago
@Pennymrtn
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.
-
I suggest using clear descriptive CSS classes like
.recipe
,.recipe-title
and.recipe-description
. -
Try using semantic HTML elements like
main
,section
andarticle
. -
I suggest not putting a fixed
height
andwidth
on an element. If the content in your element grows you'll run into overflow issues. -
I see you use a lot of
margin
wherepadding
should be used.
Do you have any specific questions about responsive design? In this case you can make your solution responsive by using a couple media queries and making your container fluid.
I hope you find my feedback valuable, and I would appreciate it greatly if you could mark my comment as helpful if it was! 🌟
Let me know if you have more questions and I'll do my best to answer them. 🙋♂️
Happy coding! 😎
Marked as helpful0@PennymrtnPosted 4 months ago@DylandeBruijn
Thank you for telling me about Flexbox. I will try to use it in the next challenge.
What do you mean by making the container fluid ? Do you mean setting the width as the device width ?
0@DylandeBruijnPosted 4 months ago@Pennymrtn
Try using updating these styles:
.grosse-boite { background-color: hsl(0, 0%, 100%); max-width: 550px; border-radius: 25px; margin: auto; padding: 1rem; }
img { max-width: 100%; border-radius: 15px; display: block; }
You also need to remove all the fixed widths on your elements, by default
block
level elements take up the full width of their parent. This is what I mean by fluid, you let the browser figure out how things should act. Trying set too many rules can work against you!border-radius: 25px
is shorthand forborder-radius: 25px 25px 25px 25px
.Marked as helpful0 -
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