Styling the last 5th li in my list

I’m running this website on wordpress and the list is generated by a plugin, however I can’t seem to change anything any of the styling on the last li tag.

HTML

<div class="home">
    <p></p>
    <h4><li><a class="wp-super-faq-question-closed" id="wp-super-faq-question--0" href="http://www.statics-wanted.co.uk/statics4cash/?wp_super_faq=earn-an-extra-750-for-your-static-genuine-additional-bonus" title="…Earn an Extra £750* for your static, Genuine Additional Bonus!!!”" rel="question"><span class="wp-super-faq-triangle">▶</span> …Earn an Extra £750* for your static, Genuine Additional Bonus!!!”</a></li></h4>
    <div class="wp-super-faq-answer" id="wp-super-faq-question--0-answer" style="zoom: 1; display: none;">Enter answer here</div>
    <h4><li><a class="wp-super-faq-question-closed" id="wp-super-faq-question--1" href="http://www.statics-wanted.co.uk/statics4cash/?wp_super_faq=you-want-to-sell-your-static-fast-and-for-as-much-as-possible" title="“…You want to sell your static FAST and for as much as possible.”" rel="question"><span class="wp-super-faq-triangle">▶</span> “…You want to sell your static FAST and for as much as possible.”</a></li></h4>
    <div class="wp-super-faq-answer" id="wp-super-faq-question--1-answer" style="zoom: 1; display: none;">Enter answer here</div>
    <h4><li><a class="wp-super-faq-question-closed" id="wp-super-faq-question--2" href="http://www.statics-wanted.co.uk/statics4cash/?wp_super_faq=85-of-customers-received-more-money-by-using-us" title="“…85% of customers received more money by using us.”" rel="question"><span class="wp-super-faq-triangle">▶</span> “…85% of customers received more money by using us.”</a></li></h4>
    <div class="wp-super-faq-answer" id="wp-super-faq-question--2-answer" style="zoom: 1; display: none;">Enter answer here</div>
    <h4><li><a class="wp-super-faq-question-closed" id="wp-super-faq-question--3" href="http://www.statics-wanted.co.uk/statics4cash/?wp_super_faq=we-have-over-98-customer-satifaction" title="“…We have over 98% customer satifaction.”" rel="question"><span class="wp-super-faq-triangle">▶</span> “…We have over 98% customer satifaction.”</a></li></h4>
    <div class="wp-super-faq-answer" id="wp-super-faq-question--3-answer" style="zoom: 1; display: none;">Enter answer here</div>
    <h4><li><a class="wp-super-faq-question-closed" id="wp-super-faq-question--4" href="http://www.statics-wanted.co.uk/statics4cash/?wp_super_faq=last-year-we-spent-over-1million-buying-static-caravans" title="…Last year we spent over £1million buying Static Caravans" rel="question"><span class="wp-super-faq-triangle">▶</span> …Last year we spent over £1million buying Static Caravans</a></li></h4>
    <div class="wp-super-faq-answer" id="wp-super-faq-question--4-answer" style="zoom: 1; display: none;">Enter answer here</div>
    <p></p>
</div>

CSS

.home li {
    list-style:url(../images/fact.png);
}
.home h4 li:nth-child(5) {
    padding-top:20px
}

JSFiddle Link

Read More

Many Thanks

Related posts

Leave a Reply

2 comments

  1. The issue is that the li isn’t the n’th child, they are each within a <h4> element. if you use :

    .home h4:nth-child(10) li {padding-top: 20px;}
    

    This should resolve the problem