Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How to change the last menu item coding in a list? Reply To: How to change the last menu item coding in a list?

#148664
Senff
Participant

You can target the last item easily by using:

ul.MenuBarHorizontal li:last-child {
    border-right:0;
}

However, you might want to give all the listitems a LEFT border (instead of right) and then target the FIRST item (li:first-child) to have no border. This is because older versions of Internet Explorer do understand first-child but not last-child.