Forums
Home / Fixing WordPress / Change default submenu inline styles
(@nickandrea19)
11 years, 2 months ago
Something in my code is writing an inline style to my navigation submenus that keeps their width at 12em, which is too narrow for some items. Here is the site: http://yogajyoti.net/wordpress/. If you hover over “Yoga” you will see what I mean.
I have seen other posts such as this one: http://stackoverflow.com/questions/5034826/wp-nav-menu-change-sub-menu-class-name, but it doesn’t help. I know basic php but I don’t find an answer in there.
Any help?
Resolved with:
#menu-secondary li ul.sub-menu, #menu-secondary li > ul li a, #menu-secondary li > ul li { width: 16em !important; }
It is, perhaps, a little redundant and it wasn’t working initially. I thought inline styles always override the stylesheet….