I am still new to Bootstrap and I am trying to figure out what is correct and what is not. Is it acceptable to have a col
inside of a col
? In the example below, I have a form that I want to fit half of the screen. I also want certain form-control elements to be half size while other of full width. Would this be the correct way to go about this or is there a better way?
Example code:
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<section class="row">
<div class="container">
<div class="col-xs-12 text-center">
<h1>Contact</h1>
</div>
<form class="col-xs-12 col-sm-8 col-sm-offset-2 form-horizontal">
<div class="form-group form-group-lg">
<div class="col-sm-12">
<input class="form-control" type="text" placeholder="name">
</div>
</div>
<div class="form-group form-group-lg">
<div class="col-xs-6">
<input class="form-control" type="text" placeholder="email">
</div>
<div class="col-xs-6">
<input class="form-control" type="text" placeholder="website">
</div>
</div>
<button type="submit" class="btn btn-warning btn-lg pull-right col-xs-12">Submit</button>
</form>
</div>
</section>