gpt4 book ai didi

html 对齐导航栏导航的文本框中间

转载 作者:行者123 更新时间:2023-11-28 04:47:20 25 4
gpt4 key购买 nike

下面是我的代码,我想在导航栏导航的中间和中心对齐文本框。我试过应用它,但文本框仍然无法对齐中心。有什么想法吗?

    <div class="row" style="border-bottom: 1px solid #ffffff;">
<div class="col-md-12">
<ul class="nav navbar-nav navbar-left">
<img src="Images/care2.jpg" title="careplus" />
<font style="color: white; font-weight: bold; font-family: Candara; font-size: x-large; vertical-align: bottom">Company Name</font>
</ul>
<ul class="nav navbar-nav navbar-center" style="text-align: center">
<asp:TextBox ID="search" runat="server"></asp:TextBox>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<asp:LinkButton ID="lnkCurrentUser" runat="server" Style="padding-bottom: 10px; padding-top: 10px;" OnClick="lnkCurrentUser_Click"></asp:LinkButton>
<asp:LinkButton ID="lnkCurrentUser1" runat="server" Style="padding-bottom: 10px; padding-top: 10px" OnClick="lnkCurrentUser1_Click"></asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="lnkLogout" runat="server" Style="padding-bottom: 10px; padding-top: 10px;" OnClick="lnkLogout_Click"><i class="glyphicon glyphicon-lock"></i> Logout</asp:LinkButton>
</li>
</ul>
</div>
</div>

我的预期输出: enter image description here

我当前的输出: enter image description here

最佳答案

对所有 UL 使用 Bootstrap 响应类 col-xs-4

<div class="row">
<ul class="col-xs-4 nav navbar-nav navbar-left">
<img src="Images/care2.jpg" title="careplus" />
<font style="color: white; font-weight: bold; font-family: Candara; font-size: x-large; vertical-align: bottom">Company Name</font>
</ul>
<ul class="col-xs-4 nav navbar-nav navbar-center" style="text-align: center">
<asp:TextBox ID="search" runat="server"></asp:TextBox>
</ul>
<ul class="col-xs-4 nav navbar-nav navbar-right">
<li>
<asp:LinkButton ID="lnkCurrentUser" runat="server" Style="padding-bottom: 10px; padding-top: 10px;" OnClick="lnkCurrentUser_Click"></asp:LinkButton>
<asp:LinkButton ID="lnkCurrentUser1" runat="server" Style="padding-bottom: 10px; padding-top: 10px" OnClick="lnkCurrentUser1_Click"></asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="lnkLogout" runat="server" Style="padding-bottom: 10px; padding-top: 10px;" OnClick="lnkLogout_Click"><i class="glyphicon glyphicon-lock"></i> Logout</asp:LinkButton>
</li>
</ul>
</div>

关于html 对齐导航栏导航的文本框中间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40878789/

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