Bootstrap Grid Code Snippets

This post provides several code snippets that make it easy for beginning (or otherwise) web designers to grab and go. Browse the library and use what is helpful.

Bootstrap Grid

Two Column Layout (50/50)

Code Snippet

<div class="row">
	<div class="col-md-6">

	</div><!-- col-md-6-->

	<div class="col-md-6">

	</div><!--col-md-6-->
</div><!-- row -->

Result

Column 1

Column 2

Two Column Layout (66/33)

Code Snippet

<div class="row">
	<div class="col-md-8">

	</div><!-- col-md-8-->

	<div class="col-md-4">

	</div><!--col-md-4-->
</div><!-- row -->

Result

Column 1

Column 2

Two Column Layout (75/25)

Code Snippet

<div class="row">
	<div class="col-md-9">

	</div><!-- col-md-9-->

	<div class="col-md-3">

	</div><!--col-md-3-->
</div><!-- row -->

Result

Column 1

Column 2


Three Column Layout (even columns)

Code Snippet

<div class="row">
	<div class="col-md-4">

	</div><!-- col-md-4-->

	<div class="col-md-4">

	</div><!--col-md-4-->
	<div class="col-md-4">

	</div><!--col-md-4-->
</div><!-- row -->

Result

Column 1

Column 2

Column 3


Four Column Layout (even columns)

Code Snippet

<div class="row">
	<div class="col-md-3">

	</div><!-- col-md-3-->

	<div class="col-md-3">

	</div><!--col-md-3-->
	<div class="col-md-3">

	</div><!--col-md-3-->
	<div class="col-md-3">

	</div><!--col-md-3-->
</div><!-- row -->

Result

Column 1

Column 2

Column 3

Column 4


Six Column Layout (even columns)

Code Snippet

<div class="row">
	<div class="col-md-2">

	</div><!-- col-md-2-->

	<div class="col-md-2">

	</div><!--col-md-2-->
	<div class="col-md-2">

	</div><!--col-md-2-->
	<div class="col-md-2">

	</div><!--col-md-2-->
	<div class="col-md-2">

	</div><!--col-md-2-->
	<div class="col-md-2">

	</div><!--col-md-2-->
</div><!-- row -->

Result

Column 1

Column 2

Column 3

Column 4

Column 5

Column 6


Chris Lam - Freelance Web Design and web development, denton, dallas, ft. worth, dfw