Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 40173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:58:56+00:00 2026-05-10T14:58:56+00:00

How do I add a last class on the last <li> within a Views-generated

  • 0

How do I add a ‘last’ class on the last <li> within a Views-generated list?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T14:58:57+00:00Added an answer on May 10, 2026 at 2:58 pm

    You could use the last-child pseudo-class on the li element to achieve this

    <html> <head> <style type='text/css'> ul li:last-child { font-weight:bold } </style> </head> <body> <ul> <li>IE</li> <li>Firefox</li> <li>Safari</li> </ul> </body> </html> 

    There is also a first-child pseudo class available.

    I am not sure the last-child element works in IE though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I add class=x to the last table cell that's on the same
I have this HTML: <div class=region-list id=region_North_America> <strong>North America</strong> </div> and want to add
I'm trying to work out how to add a first and last class on
I need to find all a elements within .paginate and add a class to
Is there an ISAPI filter that can automatically add the Last-Modified header in IIS?
I can add and remove the last line in my dynamic form and calculate
How do i add an image on the last page of existing PDF document.
I've spent last couple of hours trying to add the Memcache extension to my
I need to add an image/icon to the last column in the row. And
I would like to add an inline style to the last LI that is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.