2
當我在選項卡窗格中添加一行時,該行的內容似乎具有跨越選項卡窗格邊框的邊界的負邊距。Tabpane內部的行
如何在選項卡窗格中添加行(和列)?
下面的是我的HTML:
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" />
<h3>Profil/Virksomhedsdata</h3>
<nav class="navbar navbar-default" role="navigation">
<ul class="nav nav-tabs" id="myTab">
<li role="presentation" class="active"><a href="#profil" data-toggle="tab">Profil</a>
</li>
<li role="presentation"><a href="#autoristation" data-toggle="tab">Autoristationsområder</a>
</li>
<li role="presentation"><a href="#abonnement" data-toggle="tab">Abonnement</a>
</li>
</ul>
<div id="myTabContent" class="tab-content" style="padding-left:5px;padding-top:5px;">
<div class="tab-pane fade in active" id="profil">
<form role="form" class="form-horizontal">
<div class="row">
<div class="form-group">
<label class="control-label col-sm-1" for="email">Email:</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="email" placeholder="Enter email">
</div>
</div>
<div class="form-group">
<label for="pwd" class="control-label col-sm-1">Password:</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="pwd" placeholder="Enter password">
</div>
</div>
</div>
</form>
</div>
</div>
</nav>
Bootstrap的網格總是需要'.container'或'.container-fluid','.row'和'.col -...'。 '.row'上存在負邊距。它抵消了'.container'上的正面填充,並使網格可以嵌套。 – ckuijjer