Professional Development

Bootstrap Tip!

If you’ve done any website development lately you’re sure to be familiar with Bootstrap, a web framework that makes many things much easier to code. Bootstrap is perhaps best known as one of the first/best frameworks for “responsive” web pages, that is: web pages that automatically reconfigure themselves to best fit the viewing device screen size, whether it be full-size personal computer monitor, tablet, or smartphone.

The way bootstrap does this is with grid CSS classes, that look like .col-md-* and are based on a 12 column system.

So you might have some HTML that looks like:


This markup gives you a 12 column row first, then a 2 column row with the first column taking up 2/3 of the width and the second column taking 1/3, then a 3 column row each with equal width (1/3), and then a 2 column row, each with equal width (1/2).

Simple right? What I didn’t realize when I was first introduced to Bootstrap, and is kind of the whole point, is that you can specify the way your page renders for each device size, as so:


This markup means each div in each row will take 1/4 the width on large (lg) screens, 1/3 on medium (md), 1/2 on small (sm), and the whole row on extra-small (xs) screens. Simple!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s