Answer the question
In order to leave comments, you need to log in
How to access the first element via first-child if there is an element with a different tag?
I created a card. After I started placing elements and noticed that I can’t access the first element through first-child. 4 link elements and one text. Removing the tag with the text solves the problem, but I’m wondering if it’s possible to access the first link and if so, how?
Here is the code on codepen https://codepen.io/kungfuprogramer/pen/LYyzmEK
Answer the question
In order to leave comments, you need to log in
You don't need to contact him.
/*.card__links a:first-child{
margin-left:10px;
}*/
.card__links .card__text {
margin-right: 10px;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question