How do I add a "last" class on the last <li> within a Views-generated list?
css, drupal
Solution
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.
Problem
How do I add a "last" class on the last `<li>` within a Views-generated list?