0
我無法將品牌徽標和文本和圖像圖標與導航欄對齊以使用引導環境。Bootstrap - 對齊導航欄的品牌徽標和選項菜單(圖標+文本)
問題是徽標位於導航欄外部,圖標與文本不對齊。
請你能幫幫我嗎?
特碼是這樣的:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Web Testing</title>
<!-- INCLUDES -->
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="assets/bootstrap-table/dist/bootstrap-table.css">
<link rel="stylesheet" href="assets/bootstrap-editable/css/bootstrap-editable.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<script src="assets/jquery/jquery.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/bootstrap-table/dist/bootstrap-table.js"></script>
<script src="assets/bootstrap-editable/js/bootstrap-editable.js"></script>
</head>
<body>
<!-- NAVIGATION -->
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#defaultNavbar1"><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="http://www.google.es"><img src="assets/images/brandlogo.png"/></a></div>
<div class="collapse navbar-collapse" id="defaultNavbar1">
<ul class="nav navbar-nav">
<li class="active marges-opciones-right" ><a href="produccio.php"><i class="material-icons" style="font-size: 40px">work</i> Page1<span class="sr-only">(current)</span></a></li>
<li class="text-options marges-opciones-right"><a href="imatges.php"><i class="material-icons" style="font-size: 40px">collections</i> Page2</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown marges-opciones-left"><a href="#" class="dropdown-toggle"
data-toggle="dropdown" role="button" aria-expanded="false"><i class="material-icons" style="font-size: 40px" >face</i><span class="username"> Username </span><i class="material-icons" style="font-size: 40px" >list</i></a>
<ul class="dropdown-menu" role="menu">
<li><a href="underconstruction.html"><span class="glyphicon"></span><i class="material-icons">settings</i> preferències</a></li>
<li><a href="underconstruction.html"><span class="glyphicon"></span><i class="material-icons">lock</i> canviar password</a></li>
<li class="divider"></li>
<li><a href="logout.php"><i class="material-icons" style="font-size:18px">power_settings_new</i> log out</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
CSS的是引導的默認。
這是完美的。我要去嘗試一下。謝謝 – ruzD
當然..樂意幫忙! – Navnit
它對內容項目(選項菜單圖標+文本)工作正常,但品牌徽標不與底部自身對齊。我會希望徽標在導航欄的所有區域都是完整的。 – ruzD