Quantcast
Viewing all articles
Browse latest Browse all 8245

Landru Paard on "Wrap submenu style issues css: custom megamenu"

Hi,

I'm trying to alter wp_nav_menu using the walker class.
My objective is to create a custom megaheader.

Ik have the submenu's working as normal dropdowns, though I have not yet
succeeded wrapping the submenu in a div. That is to say, after implementing the
proper code in the functions.php and header.php I see (using firebug) that
.sub-menu is now wrapped in .sub-menu-wrap, a class which is
defined in the code added to function.php.

BUT HOW DO I STYLE THIS NEW ADDITION TO THE NESTED LIST USING CSS?!

I believe I'm lacking basic knowledge and it might be simple.
The complete nested list is build using an id called #headertop and in
firebug the position of .sub-menu-wrap is within #headertop ul li.
So how would the selector be written? #headertop ul li .sub-menu-wrap???
and the nested list within the wrap? #headertop ul li .sub-menu-wrap ul etc.?

I don't yet fully grasp how the wp_nav_menu function is related to the nested list
in html when it comes to styling in css. in addition to my question above: why do i see multiple WP-templates use an ul in an ul like headertop ul ul???
Should this not be headertop ul li ul, just as the html is nested as seen in firebug?

It's clear I'm missing something fundamental to output the megamenu I'm working on. Thanks in advance for helping!

I would prefer to dialogue without posting an url, I hope I'm right in reading this as
a general topic.


Viewing all articles
Browse latest Browse all 8245

Trending Articles