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

Abimbola 170

@Abimzz

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 challenges did you encounter, and how did you overcome them?

I had some issues with the padding for the image in the mobile view, was unable to make to the image ignore the padding of the card to fill the width of the card.. i ended up having to separate the image from the rest of the card-info, which allowed me to give them different padding ..

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

I would appreciate help with the styling of the list marker, i was unable to figure out how to change only their style without affecting the rest of the link.

Community feedback

Rgeb1 110

@Rgeb1

Posted

I had the same problem styling the list markers too. To target the marker and change the colour, the code posted by Gehad28 will do that. Also to control the spacing between the markers and the text, you can try:

ol, ul, li { padding-left: /* choose measurement */; }

0

@Gehad28

Posted

I had the same issue with the image padding, I solved it as following:

  1. Apply padding to the card, let's say padding: 0 2rem;
  2. To make the image ignore the padding and take the whole width of the card, apply a negative margin with the same value of the padding to it. margin: 0 -2rem;
  3. Now, there would be another issue as the width of the image is smaller than the screen size of the mobile (375px), so, make the minimum width of the image equals the screen size of the mobile (the min-width used in the media query). And I also set the border radius of the image to zero, so it does not have a curve at the bottom.
@media (max-width: 375px){
    .container{
        padding: 0 2rem;
    }

    img{
        margin: 0 -2rem;
        min-width: 375px;
        border-radius: 0;
    }
}

To style the list marker, use the following selector:

li::marker{
    font-size: 12px;
    color: hsl(14, 45%, 36%);
}

Hope I helped.

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