Hello, I am new to this and have a question.
My objective is to display a bar under all ".title-title" classes except the first one.
I managed to achieve this and it's working well, but for learning purposes, I would like to explore a more efficient/professional solution, maybe in just one line of code?
Thank you for your suggestions.
#second .title-title:after,
#third .title-title:after {
content: "";
display: block;
width: 40%;
margin-top: 5px;
margin-left: auto;
margin-right: auto;
border: 1px red solid;
}
/* Part of my custom bootstrap-inspired styles */
.py-ta-c {
text-align: center;
}
.py-mb-m {
margin-bottom: 10%;
}
<div id="first" class="py-ta-c py-mb-m">
<h2 class="title-title">First</h2>
<h4 class="title-subtitle">Exclude me</h4>
</div>
<div id="second" class="py-ta-c py-mb-m">
<h2 class="title-title">Second</h2>
<h4 class="title-subtitle">Include me</h4>
</div>
<div id="third" class="py-ta-c py-mb-m">
<h2 class="title-title">Third</h2>
<h4 class="title-subtitle">Include me</h4>
</div>
<!-- AND SO ON -->