如何让两个按钮在javascript中显示在彼此之下?

时间:2015-02-20 08:45:14

标签: javascript jquery html

如何在Javascript的下拉菜单中让两个按钮显示在彼此之下?这是我尝试的代码,但它们彼此相邻:

        <ul class="nav navbar-nav navbar-right">
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    <i class="glyphicon glyphicon-pencil"></i>&nbsp;Registeration Menu&nbsp;<b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <a id="btn-register" href="#">User</a>

                    <a id="btn-registerAdmin" href="#">Admin</a>
                </ul>
            </li>
            <li>
                <a href="@Url.Action("Login", "Account")">Login</a>
            </li>
        </ul> 

1 个答案:

答案 0 :(得分:1)

<li><a id="btn-register" href="#">User</a></li>
<li><a id="btn-registerAdmin" href="#">Admin</a></li>

Add <li> tags.