Issue
.year-seperator:last-of-type {
display: none;
}
<ul class="blog-year">
<li><a href="http://my.link">2016</a><span class="year-seperator">|</span></li>
<li><a href="http://my.link">2015</a><span class="year-seperator">|</span></li>
<li><a href="http://my.link">2014</a><span class="year-seperator">|</span></li>
<li><a href="http://my.link">2013</a><span class="year-seperator">|</span></li>
</ul>
Then all the separator disappear. Why? How can I get the last element of that class? Or how can I hide it?
Solution
Because they are all at last of li. It's the last li element not last span element. It should look like this:
li:last-child .year-seperator {
display: none;
}
Answered By - Quy Truong
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.