NO BUG: The WordPress toolbar covers the menu

Hello to everyone. I almost never use WP toolbar, but this time the client insisted on it. When I turn it on, it covers my top red row in heading, and i also get padding in between red and blue row. When I turn it off, everything is fine. Is there any solution for this? Thanks.

Need a website address to solve the problem.

Hi Dragan,
Welcome to the forum, and thanks so much for your report!

You probably have your header and co positioned absolutely, right? If so, you would have to introduce a separate rule that pushes the navbar down a bit depending on the height of the WP adminbar.

This should work in theory. If necessary you have to adjust it a bit.

body.admin-bar #brx-header {
  top: var(--wp-admin--admin-bar--height);
}

Best regards,
timmse

2 Likes

Thanks guys for the answers and sorry for the late response. Yes, the header is positioned absolutely and that caused the problem.

body.admin-bar #brx-header {
top: var(–wp-admin–admin-bar–height);
}

Problem solved! Thanks!

Hello Timmse. In the header template containing the website menu, I added the code you mentioned in the CSS/Custom CSS box for the top Section of the template. I still have the same problem - no change to the situation before. Am I putting the code in the wrong place?
BB v1-9-5


Forget about it, I just add the following to the bottom of functions.php (no need for the WP toolbar):
add_filter( ‘show_admin_bar’, ‘__return_false’ );
Best regards