-3
对以下bigcommerce主题进行调整:https://cornerstone-light-demo.mybigcommerce.com,我似乎无法获得顶部导航(nav.navuser)以居中对齐。我已经尝试过各种文字对齐的组合:center;和margin:0 auto;无济于事。试图居中顶部导航栏
对以下bigcommerce主题进行调整:https://cornerstone-light-demo.mybigcommerce.com,我似乎无法获得顶部导航(nav.navuser)以居中对齐。我已经尝试过各种文字对齐的组合:center;和margin:0 auto;无济于事。试图居中顶部导航栏
请尝试以下变化:
.navUser-section.navUser-section--alt {
/* add the following rule */
display: inline-block;
}
.navUser-section--alt {
/* change float:right to float: none */
float: none;
}
.navUser{
/* add the following rule */
text-align:center;
}
完美,谢谢!看起来我试图使用块而不是内联块,这是我的问题。 – BrandonD
在代码中那么多错误。提供更清洁的Jsfiddle代码,我会解决它。 –