Oleg
June 10, 2022, 6:45am
1
Hello!
I’m using Balita template to build my company’s website.
A good theme that is easy to adapt and modernize.
But I can’t change to a dark background for header menu. I see that darkand and light themes is present in _navbar.scc. I find the way to change the font black/white, but do not understand the way to make the backgroung for menu is black.
Please help me if it’s possible.
Thank you!
Hi there
Let me see it, please provide URL of the website and screenshots if necessary
Oleg
June 13, 2022, 11:36am
4
Hello!
Website is on the local pc.
The source code is:
<nav class="navbar navbar-expand-md navbar-light bg-light">
And it’s work ok!
But if I change:
<nav class="navbar navbar-expand-md navbar-dark bg-dark">
Menu text becomes light, but background stays light too!
In case of:
<nav class="navbar navbar-expand-md navbar-dark" style="background-color: #0c0c0c;" >
Menu text becomes light, but background don’t change and stays light too!
I’m using your HTML coding with WordPress, and it’s my header:
<nav class="navbar navbar-expand-md navbar-light bg-light">
<div class="container">
<div class="collapse navbar-collapse" id="navbarMenu">
<?php
wp_nav_menu(
array(
'theme_location' => 'header-menu',
// menu-header это id требуемого меню, заданных в функции register_nav_menus() см. functions.php
'container' => false,
'menu_class' => '',
'fallback_cb' => '__return_false',
'items_wrap' => '<ul id="%1$s" class="navbar-nav mr-auto mt-2 mt-lg-0 %2$s">%3$s</ul>',
'depth' => '',
'walker' => new bootstrap_4_walker_nav_menu()
)
);
?>
</div>
</div>
</nav>