bootstrap 4 pull-right在导航栏上不起作用 [英] bootstrap 4 pull-right is not working on navbar
本文介绍了bootstrap 4 pull-right在导航栏上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
- 我正在使用引导程序4.
- 我没有在页面上找到导航栏,我不知道问题出在哪里.
- 是其他人可以帮助解决此问题.
我试图将类pull-right添加到navbar-collapse div,但是它不起作用.因此,我也尝试过添加float right属性并将其设置为!important,但它也没有帮助.
I have tried to add class pull-right to navbar-collapse div but its don't work. So I have also tried to add float right property and set to !important but its also not get helpful.
<div class="collapse navbar-collapse pull-right" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">HOME</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">FAQS & HELPS</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">CONTACT</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">LOGIN</a>
</li>
</ul>
</div>
我想要div内容(导航链接)在页面的右侧.
I want div content(nav links) to the right of the page.
推荐答案
您可以尝试使用 ml-auto 代替 mr-auto 吗?
Can you please try ml-auto instead of mr-auto?
所以ul标签会像这样
<ul class="navbar-nav ml-auto">
这篇关于bootstrap 4 pull-right在导航栏上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文