Html Can';不要在我创建的导航菜单中删除空格。(引导)
我正试图消除每个堆叠药丸之间的空间 根据我现在掌握的代码,导航药丸似乎可以像预期的那样工作,但是每个药丸之间都有一些空格,似乎是不需要的按钮/链接。我试图在网上寻找解决方案,其中包括设置正确的利润率:0,但它似乎不起作用 以下是html文件中导航丸的代码:Html Can';不要在我创建的导航菜单中删除空格。(引导),html,twitter-bootstrap,css,Html,Twitter Bootstrap,Css,我正试图消除每个堆叠药丸之间的空间 根据我现在掌握的代码,导航药丸似乎可以像预期的那样工作,但是每个药丸之间都有一些空格,似乎是不需要的按钮/链接。我试图在网上寻找解决方案,其中包括设置正确的利润率:0,但它似乎不起作用 以下是html文件中导航丸的代码: <div class = "container-fluid"> <div class = "menu"> <div class = "row" bg = "warning"
<div class = "container-fluid">
<div class = "menu">
<div class = "row" bg = "warning">
<div class = "col-lg-3">
<ul class = "nav nav-pills nav-stacked">
<li class = "nav-header">Menu</li>
<li class = "active"><a href = "mbIndex.php">Home</li>
<li><div class = "glyphicon glyphicon-home" aria-hidden="true"><a href = "mbAddOrders.php">Add Order</span></li>
<li><span class = "glyphicon glyphicon-plus" aria-hidden="true"></span><a href = "mbNewOrders.php">Orders</li>
<li><span class = "glyphicon glyphicon-list-alt" aria-hidden="true"></span><a href = "mbInOutProducts.php">Products</li>
<li><a href = "mbRecords.php">Archive</li>
</ul>
</div>
</div>
</div>
</div>
.jumbotron{
background-color: lightyellow;
}
ul{
background-color: lightgrey;
}
ul.nav-pills li.active a{
border-top: 3px solid;
border-radius: 2px;
}
ul.nav-pills li:hover a{
border-top: 3px solid light blue;
}
ul.nav-pills li a{
background-color: #eee;
margin-right: 0;
}
ul.nav-pills li a{
background-color: lightyellow;
margin-right: 0;
}
您的标记有点混乱,因为它缺少结束锚标记(
)。添加菜单项的格式应如下所示:
<li><a href="..."><span class="glyphicon glyphicon-..." aria-hidden="true"></span> My name for the link</a></li>
请尝试以下标记:
<ul class = "nav nav-pills nav-stacked">
<li class = "nav-header">Menu</li>
<li class = "active"><a href = "mbIndex.php">Home</a></li>
<li><a href = "mbAddOrders.php"><span class = "glyphicon glyphicon-plus" aria-hidden="true"></span> Add Order</a></li>
<li><a href = "mbNewOrders.php"><span class = "glyphicon glyphicon-home" aria-hidden="true"></span> Orders</a></li>
<li><a href = "mbInOutProducts.php"><span class = "glyphicon glyphicon-list-alt" aria-hidden="true"></span> Products</a></li>
<li><a href = "mbRecords.php">Archive</li>
</ul>
菜单
- 档案馆