Trying to center a navbar, the “brand” and the menu items get misaligned

社会主义新天地 提交于 2019-12-11 18:44:12

问题


I got some help on centering a navbar by posting this question. I can now center the navbar, but when I do so, the "brand" winds up on line above the menu items, on the larger screens.

Sandbox example is here. The small screen with the hamburger menu works fine, but when you go to a large screen, it doesn't. To get to the larger screen, click on

If you comment out the "import "./index.css", you get a left-aligned menu that looks like this, which is what I want (except for the left-aligned part):

With the import, it is centered, but looks like this:

Centered, but now broken into two lines, with the "brand" above the links. Any ideas on how to fix this so that it is centered, but all on the same line as in the upper image? Thanks!

来源:https://stackoverflow.com/questions/53900570/trying-to-center-a-navbar-the-brand-and-the-menu-items-get-misaligned

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