I want to style only the first .mask div, but I can't find how to do that (besides giving another class and style it). Is there a way using a pseudo-element such as :first-child or :first-of-type?
I have this html:
<section class="cont-content work" id="work">
<h1>work</h1>
<article class="view">
<img src="images/g.jpg" alt="">
<div class="mask">
<h2>Title</h2>
<p>subtitle</p>
<a href="#" class="info">Read More</a>
</div>
</article>
<article class="view">
<img src="images/m.jpg" alt="">
<div class="mask">
<h2>title</h2>
<p>subtitle</p>
<a href="#" class="info">Read More</a>
</div>
</article>
<article class="view">
<img src="images/p.jpg" alt="">
<div class="mask">
<h2>title</h2>
<p>subtitle</p>
<a href="#" class="info">Read More</a>
</div>
</article>
</section>
Thanks!