How can I add vertical space between the div's. Is there any bootstrap class I can add here? Any help?
Below is the snippet from my code:
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-lg-4"> Project: </label>
<div class="col-lg-8">
@Html.TextBoxFor(model => model.detailsConfig.Project, new { onkeypress = "return isNumberKey(event)", @class = "form-control", id = "Project" })
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-lg-4">Quantity:</label>
<div class="col-lg-8">
@Html.TextBoxFor(model => model.detailsConfig.Quantity, new { onkeypress = "return isNumberKey(event)", @class = "form-control", id = "Quantity" })
</div>
</div>
</div>
</div>
You need to use <div class="form-group"> as parents like this
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<div class="form-group">
<div class="row">
<div class="col-md-12">
<div class="col-md-6">
<label class="control-label col-lg-4"> Project: </label>
<div class="col-lg-8">
@Html.TextBoxFor(model => model.detailsConfig.Project, new { onkeypress = "return isNumberKey(event)", @class = "form-control", id = "Project" })
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-12">
<div class="col-md-6">
<label class="control-label col-lg-4">Quantity:</label>
<div class="col-lg-8">
@Html.TextBoxFor(model => model.detailsConfig.Quantity, new { onkeypress = "return isNumberKey(event)", @class = "form-control", id = "Quantity" })
</div>
</div>
</div>
</div>
</div>
There are no class in the bootstrap toolbox to do this.
So the best way to do it's to add a top-buffer class on your row.
.top-buffer{
margin-top: 40px;
}
Here the codepen : https://codepen.io/boydow/pen/ayZeGW
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With