Is there a way to select the first element after wrapping to a new line?
In this example, I'm trying to make it so that middots ·
appear on all list items that don't begin a line.
I can keep the middots from appearing on the first item in a list with the :not(:first-child)
selector, but I get an unwanted middot when longer lists wrap past the first line.
ul {
padding: 0;
}
ul>li {
display: inline-block;
}
ul>li:not(:first-child)::before {
content: '· '
}
<h4>Love</h4>
<p>We love people and places with the radical love of Jesus Christ.</p>
<ul>
<li><a href="https://bible.com/59/1PE.4.8">1 Peter 4:8</a></li>
<li><a href="https://bible.com/59/GAL.5.13-14">Galatians 5:13-14</a></li>
<li><a href="https://bible.com/59/JER.29.7">Jeremiah 29:7</a></li>
<li><a href="https://bible.com/59/MAT.20.28">Matthew 20:28</a></li>
<li><a href="https://bible.com/59/ROM.13.8-10">Romans 13:8-10</a></li>
<li><a href="https://bible.com/59/JHN.13.34-35">John 13:34-35</a></li>
<li><a href="https://bible.com/59/JHN.15.12">John 15:12</a></li>
</ul>
If I could select for elements that start a line after wrapping, I could get my desired behavior. Is there a way to select for that in CSS? If not, how would you avoid beginning lines with ·
in pure CSS?