Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Bootstrap Site Blueprints Volume II

You're reading from  Bootstrap Site Blueprints Volume II

Product type Book
Published in Jan 2016
Publisher Packt
ISBN-13 9781785281099
Pages 328 pages
Edition 1st Edition
Languages
Author (1):
Matt Lambert Matt Lambert
Profile icon Matt Lambert

Coding the article template


The second template in this project is the article or post template. It will contain the detailed view and content for a magazine story. Before we start coding the page, let's see what it will look like:

The layout here is narrower, which allows easier readability of a large amount of content. I've also followed my regular minimal style to keep the page looking really clean. The entire page template is wrapped in a <div> tag with a class of .article so that we can apply some styling:

<div class="article">
  ..
</div>

We had already added the styles for this when we set up our .page-body class in the previous template. However, there is a container class inside of the .article class that needs some customization:

.article .container {
  padding-left: (@padding * 18);
  padding-right: (@padding * 18);
}

This might look like a decent amount of padding, and it is. This is how we will achieve the narrower column layout that we want for better readability...

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 €14.99/month. Cancel anytime}