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

Four Card Feature | Grid Layout

@mbilal-x

Desktop design screenshot for the Four card feature section coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I'm struggling to give card::before the same width as card.

Right now, I kind of made it look good but it's still unfinished How can I get it right??

Community feedback

@DonUggioni

Posted

Hey there,

By the looks of it, you're setting your card to a max-width of 22rem and the before element a fixed width of 10rem.

Usually, when you want to position a before or after pseudo element, you need to make it position absolute and its parent position relative. Try to do that and then on the pseudo element, set top:0, left: 0 and width of 100%, so it takes up 100% of it's parent width and it's responsive.

Give it a try and hope it helps!

Marked as helpful

0

@mbilal-x

Posted

@DonUggioni

Thanks Renan It worked :D

0

@DonUggioni

Posted

@mbilal-x Awesome! Glad it helped =)

0

@Cyrus-Akwaboah-Emmanuel

Posted

Nice work bro.

1

@mbilal-x

Posted

@Cyrus-Akwaboah-Emmanuel

Thanks Emmanual. Also, your design is soo cool :D

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