Book Image

Learning Bootstrap 4 by Building Projects

Book Image

Learning Bootstrap 4 by Building Projects

Overview of this book

Bootstrap, the world’s most popular frontend framework, is an open source toolkit for building web applications with HTML, CSS, and JavaScript. Learning Bootstrap 4 by Building Projects covers the essentials of Bootstrap 4 along with best practices. The book begins by introducing you to the latest features of Bootstrap 4. You will learn different elements and components of Bootstrap, such as the strict grid system, Sass, which replaced Less, flexbox, Font Awesome, and cards. As you make your way through the chapters, you will use a template that will help you to build different kinds of real-world websites, such as a social media website, a company landing page, a media hosting website, and a profile page, with ease. By the end of this book, you will have built websites that are visually appealing, responsive, and robust.
Table of Contents (9 chapters)
Free Chapter
1
Introduction

Completing Sass for index

In the last section, we left off with starting to do some styling on our jumbotron. There are a few more things we're going to do on the jumbotron, mainly adding margins and making it appear much better than how it looks now:

.jumbotron h1 {
margin-top: 60px;
}
.jumbotron p {
margin-bottom: 40px;
}
.jumbotron img.app-btn {
width:40%;
margin-right:30px;
}
.jumbotron img.showcase-img{
width:75%;
}

As you can see, the code is self-explanatory. As mentioned earlier, it's a trial and error method to see what components of the website look like when it comes to styling. We have added a style to the heading, Capture Life, the text below it, the Google Play and Apple Store images, and finally the image on the right-hand side of the jumbotron.

Once you make these changes to the jumbotron code, you can inspect the elements and play with the margin...