Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Recipe page

@luis-gn006

Desktop design screenshot for the Recipe page coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

Thanks to the help from the community i fix the il with padding.

What challenges did you encounter, and how did you overcome them?

When i started i wasn't sure how to solve the position in the desktop resolution , but studying more now i know hot to make it

What specific areas of your project would you like help with?

The margin left change when makes a jump line,so i will like to know how to fix that and make the margin affect all the paragraph in the ul list item

Community feedback

@Lescano713

Posted

Your code looks good, but I think you can improve it:

  • To position a container on different screens sizes you can use :
body{
min-width: 100dvw; 
min-heigth: 100dvh;
display: flex;
align-items: center;
justify-content: center;
}

The min-width and min-height ensure that if the page increases in size, it will take up the new space completely and center the container.

  • For the bullets next to the list items, you can use:
ul{
margin-inline-start: -10px
}
li{
padding-left: 10px}

Instead of using margin, you can use padding to separate the bullets from the <li> elements. If you use margin, it might not work well with inline elements. If you replace a <span> with a <p> element or set the display to block, you might notice that the issue resolves. Some elements are inline or block by default, so you need to understand these properties and their effects in your code.

Marked as helpful

0

@luis-gn006

Posted

@Lescano713 Thank you so much for your observations , i tried with the padding and works perfectly

0

@Lescano713

Posted

Your code looks good, but I think you can improve it:

  • To position a container on different screens sizes you can use :
body{
min-width: 100dvw; 
min-heigth: 100dvh;
display: flex;
align-items: center;
justify-content: center;
}

The min-width and min-height ensure that if the page increases in size, it will take up the new space completely and center the container.

  • For the bullets next to the list items, you can use:
ul{
margin-inline-start: -10px
}
li{
padding-left: 10px}

Instead of using margin, you can use padding to separate the bullets from the <li> elements. If you use margin, it might not work well with inline elements. If you replace a <span> with a <p> element or set the display to block, you might notice that the issue resolves. Some elements are inline or block by default, so you need to understand these properties and their effects in your code.

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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