Opened 14 years ago
Closed 14 years ago
#15529 closed enhancement (duplicate)
Add class name to first menu item in wp_nav_menu()
Reported by: | johnbillion | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.1 |
Component: | Template | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
If the theme displays the output of wp_nav_menu()
horizontally and wants to put a separator between menu items, then usually something like a left border is used.
To remove this separator from the left hand side of the menu, the first item will often have the border or background image removed by using the ':first-child' CSS pseudo class. This is all well and good but the ':first-child' selector isn't supported in IE6.
If we added a 'first-child' or 'first-menu-item' class to the first menu item then it'd be easier for themers to use this property and maintain support for IE6.
Thoughts?
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Patch. I think this covers it.