uk-navbar customization


Hello,

for my primary menu, I would like to know the best way to style the drop-down when hovering over a menu item. In the end, I'd like to have the dropdown actually create a full-width (sub-navbar) for the sub-items right below the primary navbar.

Thanks for any help.


Hey Marc,

Sorry for the late reply πŸ™ Well you could either style it by modifying some UIkit variables or simply with CSS. UIkit variables are quite complex when it comes to dropdown and I found myself ofter wasting time with it, so personally I style dropdowns using CSS πŸ™‚

If you need a hand with the CSS, post a wireframe and I will happily point you to the right direction.

Have fun,


I solved this with the following:

Added the following to my functions.php file:

add_action('beans_before_load_document', function() {
   beans_replace_attribute( 'beans_sub_menu_wrap[_navbar]', 'class', 'uk-dropdown-blank' );
});

And I styled the .uk-dropdown-blank and the .sub-menu.uk-nav class for my needs.

Thanks.


Fantastic, I am glad to hear you found a solution!

Thanks for sharing πŸ™‚

Write a reply

Login or register to write a reply, it's free!