Reader small image

You're reading from  Bootstrap Site Blueprints Volume II

Product typeBook
Published inJan 2016
Reading LevelIntermediate
PublisherPackt
ISBN-139781785281099
Edition1st Edition
Languages
Right arrow
Author (1)
Matt Lambert
Matt Lambert
author image
Matt Lambert

Matt Lambert is a designer and developer with 15+ years of experience. He currently works full-time as a Senior Software Engineer for CA Technologies in Vancouver, BC, Canada. In his free time he is an author, artist, and musician. In 2005, Matt founded Cardeo Creative, which is a small web design studio based in Vancouver. He works with a select list of clients on a part-time basis while producing his own products on the side. To date, Matt has self-published 3 additional development books titled: Mastering Bootstrap, CSS3 Handbook, and the Freelance Startup Guide.
Read more about Matt Lambert

Right arrow

Setting up the index page


The layout for the body of the page is the first place where we will use some different grid classes. When the project is viewed on the desktop, there will be a main feed on the left and a sidebar on the right. If we switch to viewing this on a mobile device, there will be only one column with the sidebar sliding in below the main feed. Here's the grid code we'll use to set this up:

<div class="col-xs-12 col-lg-8">
…
</div>
<div class="col-xs-12 col-lg-3 col-lg-offset-1">
…
</div>

The first column uses the col-lg-8 class for the desktop, which will set the feed to roughly three-fourth of the width of the layout. However, for mobile devices, I'm using the col-xs-12 class because I want it to span the width of the layout. The second column is the sidebar and for the desktop I'm offsetting it by one column with the col-lg-offset-1 class, then I'm using the col-lg-3 class to fill in the rest of the row. This will set the sidebar to be roughly the...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Bootstrap Site Blueprints Volume II
Published in: Jan 2016Publisher: PacktISBN-13: 9781785281099

Author (1)

author image
Matt Lambert

Matt Lambert is a designer and developer with 15+ years of experience. He currently works full-time as a Senior Software Engineer for CA Technologies in Vancouver, BC, Canada. In his free time he is an author, artist, and musician. In 2005, Matt founded Cardeo Creative, which is a small web design studio based in Vancouver. He works with a select list of clients on a part-time basis while producing his own products on the side. To date, Matt has self-published 3 additional development books titled: Mastering Bootstrap, CSS3 Handbook, and the Freelance Startup Guide.
Read more about Matt Lambert