Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Bootstrap Site Blueprints Volume II

You're reading from   Bootstrap Site Blueprints Volume II Maximize the potential of Bootstrap for faster and more responsive web applications

Arrow left icon
Product type Paperback
Published in Jan 2016
Publisher Packt
ISBN-13 9781785281099
Length 328 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Matt Lambert Matt Lambert
Author Profile Icon Matt Lambert
Matt Lambert
Arrow right icon
View More author details
Toc

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime