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
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Building a real-life web page example with the default grid


In this recipe, we will build a real-life example web page.

Getting ready

To get ready for this recipe, check out the following links to the official Bootstrap docs:

  • https://v4-alpha.getbootstrap.com/layout/grid/
  • https://v4-alpha.getbootstrap.com/examples/grid/

We will also use an example image from pexels.com, and the Font Awesome icon font, at http://fontawesome.io/.

How to do it...

  1. Create new files and folders, as follows:
      touch app/partial/_recipe02-08-css.ejs app/partial/_chapter02-08- 
      html.ejs app/partial/_nav02-08.ejs  main-02-08.scss;
      mkdir app/css/img
  1. Let's now update our bower_components. In the root of your project, run the following command to install the font-awesome library:
      bower install font-awesome
  1. Download the image to use in this recipe from https://www.pexels.com/photo/box-business-celebrate-celebration-296878/. Pick the large size (with the width of 1920 pixels) in the download options. Paste...