Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Bootstrap 4 by Building Projects

You're reading from   Learning Bootstrap 4 by Building Projects Develop 5 real-world Bootstrap 4.x projects from scratch

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher Packt
ISBN-13 9781789343250
Length 218 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Eduonix Learning Solutions Eduonix Learning Solutions
Author Profile Icon Eduonix Learning Solutions
Eduonix Learning Solutions
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. Introduction
2. Bootstrap 4 Features FREE CHAPTER 3. Photosharing Website 4. Building a Resume Website 5. Social Network Frontend 6. Agency Website 7. Lightbox Website 8. Other Books You May Enjoy

Adding styles to the navigation and landing page

Let's jump into our Sass file now to fix it. The first thing that we are going to do is add in a few variables. Here they are:

$primary:#26a5d3;
$dark:#333;
$light:#f4f4f4;

Next, we are going to put in our code for the HTML and body:

html{
width:100%;
height:100%;
}

body{
width:100%;
height:100%;
font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;
color:$dark;
background-color:$light;
overflow-x: hidden;
}

As you can see, in the body, the variables we created are getting used. There is nothing very complex going on here. We are going to see a lot of styling code now, but I will explain some of the more involved ones.

The Sass code for our typography is as follows:

h1, h2, h3, h4, h5, h6{
margin: 0 0 2rem;
text-transform:uppercase;
font-family: "Montserrat","Helvetica Neue",Helvetica,Arial...
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
Banner background image