@arey-dev
Posted
Hello, congratulations on completing this challenge!!
Regarding with your problem. Remove the .card2
and .card3
, just have 1 class named .card
and then try to use the pseudo-class :nth-of-type()
div.card:nth-of-type(1) {
margin-top: 1rem;
}
:nth-of-type()
pseudo-class targets the siblings of the same type based on its positioning. Which is in your case, the div
with the class .card
.
Read this for more info :nth-of-type() and If you wouldn't mind, try to look at my solution. Maybe it will help you.
Marked as helpful
@mohit1607
Posted
@arey-dev Thank you very much for help, This is the thing that I couldnt figure out for long time but now with the help of you it is. Thanks again and would love to hear from you in future again.
@arey-dev
Posted
@mohit1607 Glad to have been a help. Happy Coding 😊
Marked as helpful