如何将导航栏动作链接修复到右侧

时间:2019-07-12 18:55:31

标签: c# html css asp.net model-view-controller

<div class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            @Html.ActionLink("Moto Technic", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
        </div>
        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                <li>@Html.ActionLink("Anasayfa", "Index", "Home")</li>
                <li>@Html.ActionLink("Motosikletler", "About", "Home")</li>
                <li>@Html.ActionLink("En Son Eklenenler", "Contact", "Home")</li>
                <li style="text-align:right; display:block">@Html.ActionLink("Giriş Yap", "Login","Home")</li>
                <li style="">@Html.ActionLink("Üye Ol","Register","Home")</li>

            </ul>
        </div>
    </div>
</div>

伙计们,我想将Uye olGiris Yap操作链接放在右侧,但是文本对齐不起作用。你知道该怎么办吗?我正在与MVC合作,但目前不知道该怎么办。无论我添加什么,它都放在左侧,但是当我发短信text-align:right时,它不起作用...

1 个答案:

答案 0 :(得分:0)

尝试将样式应用于

  

ul

代替

  

li