[wp-hackers] Adding class to first menu item of submenu in wp_nav_menu

Mike Schinkel mikeschinkel at newclarity.net
Mon Jun 28 00:29:10 UTC 2010


> Why would you need that? Just use "ul.sub-menu li:first-child". CSS2
> has you covered on that score.

FYI, li:first-child doesn't work 100%[1] in IE8 nor at all in IE7, unfortunately.

-Mike
[1] http://www.quirksmode.org/css/contents.html



More information about the wp-hackers mailing list