如何在菜单最右侧添加菜单链接

时间:2016-12-30 13:15:18

标签: html css

我想在我的NAVBAR的右侧添加一个简单的菜单链接 放大镜搜索图标旁边 基本上我需要一个捐赠链接菜单 非常感谢您的帮助。

这是网站:www.clihelp.org

这是我的NAVBAR的菜单代码。如果您需要更多代码,请与我们联系。

    <div class="container-fluid">
    <div class="row">
        <div class="col-md-12">
            <nav class="navbar navbar-default" role="navigation">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                        <span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
                    </button> <a class="navbar-brand" href="<?php echo $config['serv_url'];?>">clihelp <sup>beta</sup></a>
                </div>
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <?php
                    $Show->show_navbar_menu();
                    ?>
                    <ul class="nav navbar-nav navbar-right">
                        <form class="navbar-form navbar-left" role="search" method="POST" action="<?= $config['serv_url'];?>">
                            <div class="input-group">
                                <div class="input-group-btn search-panel">
                                    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                        <span id="search_concept">Filter by</span> <span class="caret"></span>
                                    </button>
                                    <?php 
                                    $Show->filter_menu();
                                    ?>
                                </div>
                                <input type="hidden" name="search_param" value="all" id="search_param">
                                <input type="hidden" name="os_id" >         
                                <input type="text" class="form-control" name="q" placeholder="Search term...">
                                <span class="input-group-btn" id="search-wrapper">
                                    <button class="btn btn-default" type="submit" id="search-button" disabled><span class="glyphicon glyphicon-search"></span></button>
                                </span>
                            </div>
                        </form>
                    </ul>
                </div>
            </nav>
        </div>
    </div>
</div>

2 个答案:

答案 0 :(得分:1)

试试这个:

<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<nav class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
</button> <a class="navbar-brand" href="<?php echo $config['serv_url'];?>">clihelp <sup>beta</sup></a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<?php
$Show->show_navbar_menu();
?>
<ul class="nav navbar-nav navbar-right">
<form class="navbar-form navbar-left" role="search" method="POST" action="<?= $config['serv_url'];?>">
<div class="input-group">
<div class="input-group-btn search-panel">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span id="search_concept">Filter by</span> <span class="caret"></span>
</button>
<?php 
$Show->filter_menu();
?>
</div>
<input type="hidden" name="search_param" value="all" id="search_param">
<input type="hidden" name="os_id" >         
<input type="text" class="form-control" name="q" placeholder="Search term...">
<span class="input-group-btn" id="search-wrapper">
<button class="btn btn-default" type="submit" id="search-button" disabled><span class="glyphicon glyphicon-search"></span></button>
</span>
</div>
</form>
<li><a href="http://www.google.com">Link</a></li>
</ul>
</div>
</nav>
</div>
</div>
</div>

答案 1 :(得分:0)

更改你的HTML

<ul class="nav navbar-nav navbar-right">
  <li>
<form class="navbar-form navbar-left" role="search" method="POST" action="<?= $config['serv_url'];?>">
<div class="input-group">
<div class="input-group-btn search-panel">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span id="search_concept">Filter by</span> <span class="caret"></span>
</button>
<?php 
$Show->filter_menu();
?>
</div>
<input type="hidden" name="search_param" value="all" id="search_param">
<input type="hidden" name="os_id" >         
<input type="text" class="form-control" name="q" placeholder="Search term...">
<span class="input-group-btn" id="search-wrapper">
<button class="btn btn-default" type="submit" id="search-button" disabled><span class="glyphicon glyphicon-search"></span></button>
</span>
</div>
</form>
    </li>
  <li><a href="#">Donate Link</a></li>
</ul>