Navmenu bar disappears when I active Bootstrap css

2019-08-02 14:45发布

问题:

After I active Bootstrap to my theme I am developing in Wordpress - my nevmenu disappeared. It is there when I scale the website down (max widt 980px) and is visible as a collapse menu. Maybe there is some .nav styling from Bootstrap that are conflicting with my theme.

Can you please help me finding out what it is?

Here is a link to the website: http://list.thorsteinnhelgason.is/index.php/2018/02/15/prufupostur/ Best B

回答1:

Saw your site, you messed up the content within navbar, your nav is there but it's not displaying at a block level.

I would suggest you use this one instead, I'm using the same. wp-bootstrap-navwalker. The developer has explained a great deal of using it. Try it.



回答2:

The navbar you are using is Bootstrap v4, but your stylesheet is using v2.3.2: http://list.thorsteinnhelgason.is/wp-content/themes/listin/bootstrap/css/bootstrap.css

If you are unable to upgrade WordPress for some reason, you can add this style:

.navbar-toggleable-md .collapse {
    display: flex !important;
}

And change your HTML to this:

<div class="navbar navbar-toggleable-md navbar-inverse navbar-fixed-top">...

Good luck!