gpt4 book ai didi

javascript - Bootstrap 下拉右对齐失败

转载 作者:行者123 更新时间:2023-11-28 12:34:43 27 4
gpt4 key购买 nike

我试图将我的下拉菜单对齐到导航栏的右侧但失败了,我尝试了很多方法来做到这一点,但我在所有方面都失败了。如果有任何方法可以解决此问题,请有人帮助我,在此先感谢。

<?php
$curdir = getcwd ();
chdir('/forum');
require_once('/global.php');
chdir ($curdir);
$username=$vbulletin->userinfo['username'];
?>
<div class="navbar-wrapper">
<div class="container">
<div class="navbar navbar-inverse">
<div class="navbar-inner">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" href="/index.php"></p>Name</p></a>
<div class="nav-collapse collapse">
<ul class="nav">
<li>
<a href='/index.php'><img src="/home.png" height="25" width="25"> Home</b></a>
</li>

<li>
<a href='/forum'><img src="/forum.png"> Forum</a>
</li>
<li class='dropdown'>
<a href='#' class='dropdown-toggle' data-toggle='dropdown'><img src="P.png"> Players<b class='caret'></b>

</a>
<ul class="dropdown-menu">
<li>
<a href="action.php"><img src="/action.php"> Action</a>
</li>
</ul>
</li>
<?php if ($vbulletin->userinfo['usergroupid'] == '1' )
echo "
<li class='dropdown'>
<a href='#' class='dropdown-toggle' data-toggle='dropdown'><i class='icon-user icon-white'></i> Welcome Guest<b class='caret'></b>
</a>
<ul class='dropdown-menu'>
<li>
<a href='#'><img src='/img/connectserver.png'> Action</a>
</li>
<li>
<a href='/login.php'><i class='icon-ban-circle'></i> Login</a>
</li>
<li>
<a href='register.php'><i class='icon-ok'></i> Register</a>
</li>
</li>
</ul>
</ul>
</li>";?>
<?if ($vbulletin->userinfo['usergroupid'] != '1' )
echo "
</li>
<li class='dropdown'>
<a href='#' class='dropdown-toggle class='nav pull-right' data-toggle='dropdown'><img src='/img/connectserver.png'></i> Welcome <font color='red'>$username</font><b class='caret'></b>
</a>
<ul class='dropdown-menu'>
<li>
<a href='#'><img src='/img/connect.png' height='19' width='19'> Connect to server</a>
</li>
<!-- <li>
<a href='#'><img src='/log-out.png' height='19' width='19'> Log out</a>

</li> -->
</li>
</ul>
</li></p>";?>
</ul>
</div>
</div>
</div>
</div>
</div>

最佳答案

html 看起来无效。我看不到你所有的代码,但似乎你在 p 标签内关闭 ul 标签后有一个关闭 li 标签? li 只能在 ul 或 ol 标签内。确保 html 正确,然后重试!希望这对您有所帮助!

关于javascript - Bootstrap 下拉右对齐失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18022196/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com