Navmenu bar disappears when I active Bootstrap css

让人想犯罪 __ 提交于 2019-12-11 05:28:25

问题


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!



来源:https://stackoverflow.com/questions/48930858/navmenu-bar-disappears-when-i-active-bootstrap-css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!