Html 菜单到标题的中心
我正在为一个HTML网站设置一个新菜单。。。问题是,我不能在DIV的中心,现在它在左侧 我试过了,但没用Html 菜单到标题的中心,html,css,Html,Css,我正在为一个HTML网站设置一个新菜单。。。问题是,我不能在DIV的中心,现在它在左侧 我试过了,但没用 .flat-mega-menu { margin: 0 auto; /* margin for align container center */ padding: 0; position: relative; z-index: 999; font-size: 1em; display: block; /*max-wid
.flat-mega-menu {
margin: 0 auto; /* margin for align container center */
padding: 0;
position: relative;
z-index: 999;
font-size: 1em;
display: block;
/*max-width: 1280px; */ /* container max-width 1280px */
min-height: 60px;
width: 100%;
font-family: "nunito regular";
min-width: 180px;
}
菜单应该在页面的中间,而不是左边。请检查此项
如您所见,我在ul中添加了文本align:center,就是这样:尝试使用属性:
ul.collapse {
justify-content: center;
display: flex;
}
你好。请在您的问题中直接包含相关代码,而不是链接到外部站点。谢谢。嗨。。非常感谢。但这并不是因为我什么原因而改变的,