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

Creating custom media breakpoints

Media queries basically help to render content on sites depending on the screen's resolution. Our website is already responsive, so you can go and resize your browser to see the changes take effect. In our case, adding media queries won't make a major difference, but we are going to do a little bit of customization to make it render and look better. Let's go ahead and add media breakpoints, and see how certain content within the website changes its size and layout depending on whether you are viewing the website on a tab, mobile, or desktop:

/* media queries */
@media (min-width:1200px) {
.jumbotron img.showcase-img{
width:61%;
margin: 5px 0 0 40px;
}
}

@media (min-width:991px) {
.show-img {
display:none;
}
}

@media(min-width: 768px) and (max-width:990px){
.jumbotron img.app-btn{
width:30...