Hi,
I am having problems with first-child selector. This is my html code
<div>
<div></div>
<article class="portfolio"></article>
<article class="portfolio"></article>
<article class="portfolio"></article>
</div>
I want to select the first article
from the list so I do this
article.portfolio:first-child {}
but it wont work. Only if I remove the div
above it it will select it. I thought first-child
would select the first ARTICLE from inside the parent div
but instead its counting the div
above it as the first child.
What kind I do so first-child selects considering only the articles while ignoring all other element types?
Thank you.