Book Image

Bootstrap 4 Cookbook

By : Ajdin Imsirovic
Book Image

Bootstrap 4 Cookbook

By: Ajdin Imsirovic

Overview of this book

Bootstrap, one of the most popular front-end frameworks, is perfectly built to design elegant, powerful, and responsive interfaces for professional-level web pages. It supports responsive design by dynamically adjusting your web page layout. Bootstrap 4 is a major update with many impressive changes that greatly enhance the end results produced by Bootstrap. This cookbook is a collection of great recipes that show you how to use all the latest features of Bootstrap to build compelling UIs. This book is using the most up-to-date version of Bootstrap 4 in all its chapters. First off, you will be shown how you can leverage the latest core features of Bootstrap 4 to create stunning web pages and responsive media. You will gradually move on to extending Bootstrap 4 with the help of plugins to build highly customized and powerful UIs. By the end of this book, you will know how to leverage, extend, and integrate bootstrap to achieve optimal results for your web projects.
Table of Contents (19 chapters)
Title Page
About the Author
About the Reviewer
Customer Feedback

Positioning nav-tabs with Flexbox

In this recipe, we will look into using Flexbox utility classes to easily align nav-tabs. Doing this is a simple task. However, to extend the recipe and make it more useful, we have also included a lot of content in each of the nav-tabs. Thus, in this recipe, besides demonstrating how to align nav-tabs, we will look into splitting a complex layout into several partials, dealing with different heights on tabs, and using a few simple CSS declarations to modify the look of our nav-tab items.

Getting ready

To preview the completed recipe, navigate to chapter8/complete/app through your console. Run the harp server command. Open your browser and visit localhost:9000/recipe08-07. Click on different tabs and try resizing the viewport. Look at the way that tab content responds to changes in viewport size.

How to do it…

  1. In the chapter8/start/app folder, open the file titled recipe08-07.ejs and paste the following code in it:
<%- partial("partial/_0807-01-recipe-intro...