Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Mastering Bootstrap 4
Mastering Bootstrap 4

Mastering Bootstrap 4: Master the latest version of Bootstrap 4 to build highly customized responsive web apps , Second Edition

eBook
S$12.99 S$52.99
Paperback
S$66.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Mastering Bootstrap 4

Making a Style Statement

In the previous chapter, we showed you the first glimpse of MyPhoto, the Bootstrap website, that we will build up throughout the following chapters. Now it is time to get our hands dirty and actually start building the first section of this website. We will begin with the first pass at an element of the Services section that presents the list of print sizes available to order. The page will be constructed using a grid that we will build using Bootstrap's grid system. We will then create image elements within the grid system, apply image modifiers to them, and leverage Bootstrap's utility classes to create visual indicators and optimized layouts specific to different display resolutions.

By the end of this chapter, through code examples and studying the Bootstrap source code, you will have gained a deep understanding of the following:

  • Bootstrap...

The grid system

Bootstrap's grid system is arguably its most impressive and most commonly used feature, as it solves the important task of horizontal and vertical positioning of a page's contents, allowing the contents to be structured across multiple display widths. Therefore, mastering this core functionality is essential for any Bootstrap developer.

As already noted in Chapter 1, Revving Up Bootstrap, Bootstrap 4 is mobile-first. As such, it should come as no surprise that the grid system is optimized for smaller viewports, and it scales up to suit larger viewports (as opposed to scaling down to smaller viewports).

What is a viewport?
A viewport is the available display size to render the contents of a page, that is, it refers to your browser window, minus the toolbars and scrollbars. The viewport should not be confused with the viewport meta tag, which is used to...

Image elements

As a next step, let's add an image to each column in our grid. Each image will act as a category heading, as well as allow us to display our photographic wares. The images used in the following part, and throughout the rest of the book, are provided in this book. Take a look at the following code:

<div class="col-sm-3">
<img src="images/small.jpg">
<h5>Small</h5>
<div class="row">
<div class="col-sm-4">6x5</div>
<div class="col-sm-4">8x10</div>
<div class="col-sm-4">11x17</div>
</div>
</div>
<div class="col-sm-3">
<img src="images/medium.jpg">
<h5>Medium</h5>
<div class="row">
<div class="col-sm-4">12x18...

Responsive utilities

Responsive utilities are a group of media query-based classes that control when an element should be hidden or shown depending on the viewport. One popular use case for this is controlling display-specific navigation. For example, a page may have a navigation bar on large displays and a hidden navigation on small displays, which is only displayed when a user chooses to open the navigation.

Let's look at a quick example with our Print Size page. Add the d-none and d-sm-block classes to the img elements:

<div class="container">
<h1>Our Print Sizes</h1>
<div class="row">
<div class="col-sm-3">
<img src="images/small.jpg" class="img-fluid rounded-circle
d-none d-sm-block">
<h5>Small</h5>
...
...

Summary

In this chapter, we covered the most important aspect of Bootstrap—its grid system. We learned how to use the grid system to structure a page, and how the grid system is actually implemented using breakpoints and media queries. As a result, we learned how to leverage Bootstrap to create a responsive web page and how to target specific content to specific displays. In addition, we also discovered a very nice feature of all the layout-specific utility classes—the fact that they can also be used as mixins and are indeed used as mixins within other Bootstrap classes. Leveraging these classes when we start writing custom style rules for MyPhoto will surely come in useful. As our understanding of Bootstrap is now sufficient enough to allow us to structure a basic page, let's proceed to the next chapter in which we will build the layout for our MyPhoto page...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Master the art of creating highly intuitive and responsive web interfaces with Bootstrap 4
  • Combine the power of Bootstrap and popular front-end JavaScript frameworks such as Angular and React to build cutting-edge web apps
  • Infuse your web pages with life and movement using Bootstrap jQuery plugins

Description

Bootstrap 4 is a free CSS and JavaScript framework that allows developers to rapidly build responsive web interfaces. This book will help you use and adapt Bootstrap to produce enticing websites that fit your needs. You will build a customized Bootstrap website from scratch, using various approaches to customize the framework with increasing levels of skill. You will get to grips with Bootstrap's key features and quickly discover various ways in which Bootstrap can help you develop web interfaces. Then take a walk through the fundamental features, such as its grid system, global styles, helper classes, and responsive utilities. When you have mastered these, you will discover how to structure page layouts, utilize Bootstrap's various navigation components, use forms, and style different types of content. Among other things, you will also tour the anatomy of a Bootstrap plugin, create your own custom components, and extend Bootstrap using jQuery. You will also understand what utility classes Bootstrap 4 has to offer, and how you can use them effectively to speed up the development of your website. Finally, you will discover how to optimize your website and integrate it with third-party frameworks. By the end of this book, you will have a thorough knowledge of the framework's ins and outs, and will be able to build highly customizable and optimized web interfaces.

Who is this book for?

This book targets readers who wish to leverage Bootstrap 4 to create responsive web applications. Basic knowledge of web development concepts and web technologies such as HTML, CSS, and JavaScript is required.

What you will learn

  • •Create a professional Bootstrap-based website from scratch without using third-party templates
  • •Leverage Bootstrap s powerful grid system
  • •Style various types of content and learn how to build a page s layout from scratch by applying the power of Bootstrap 4
  • •Take advantage of Bootstrap s form helper and contextual classes
  • •Improve your website s overall user experience with headers and footers
  • •Infuse your web pages using Bootstrap jQuery plugins and create your own Bootstrap plugins
  • •Learn what utility classes Bootstrap 4 has to offer, how they are implemented, and the best way to use them.
  • •Create more advanced web interfaces by leveraging the power of accordions, dropdowns, and list groups.
  • •Incorporate Bootstrap into an AngularJS or React application and use Bootstrap components as AngularJS directives

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 22, 2018
Length: 354 pages
Edition : 2nd
Language : English
ISBN-13 : 9781788838214
Vendor :
Bootstrap
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Feb 22, 2018
Length: 354 pages
Edition : 2nd
Language : English
ISBN-13 : 9781788838214
Vendor :
Bootstrap
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total S$ 193.97
Learning jQuery 3
S$59.99
Bootstrap 4 Cookbook
S$66.99
Mastering Bootstrap 4
S$66.99
Total S$ 193.97 Stars icon
Banner background image

Table of Contents

12 Chapters
Revving Up Bootstrap Chevron down icon Chevron up icon
Making a Style Statement Chevron down icon Chevron up icon
Building the Layout Chevron down icon Chevron up icon
On Navigation, Footers, Alerts, and Content Chevron down icon Chevron up icon
Speeding Up Development Using Third-Party Plugins Chevron down icon Chevron up icon
Customizing Your Plugins Chevron down icon Chevron up icon
Advanced Third-Party Plugins Chevron down icon Chevron up icon
Utilities Chevron down icon Chevron up icon
List Groups and Accordions Chevron down icon Chevron up icon
Optimizing Your Website Chevron down icon Chevron up icon
Integrating with AngularJS and React Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
(6 Ratings)
5 star 33.3%
4 star 0%
3 star 16.7%
2 star 33.3%
1 star 16.7%
Filter icon Filter
Top Reviews

Filter reviews by




DefendTek.us Jul 26, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Easy to follow along, work as you go type book. I liked it - it worked for me going from BS 3 to 4.
Amazon Verified review Amazon
Fan Amazon Customer Dec 17, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
C'est le livre que j'attendais, commencé à pratiquer le projet de site web proposé par l'auteur pour enseigner Bootstrap 4. C'est une pédagogie intéressante.
Amazon Verified review Amazon
Michael May 04, 2019
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Good for someone wishing to extend their general knowledge and consolidate on concepts they may not be sure about. Building a website as a teaching tool is overused and it would have been better to use smaller 'CODEPEN' Type examples of varying complexity to explain how things work and when to use them, the book would then be worth the asking price. The most annoying feature is the way text is obscured by large black circular icons, supposedly to draw attention to important concepts. It does not work and has the opposite effect as it makes the text very difficult to read.
Amazon Verified review Amazon
William J. Gecawich Apr 06, 2018
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I was hoping for this ebook to be a searchable reference as I tried to do various tasks in Bootstrap. Unfortunately very little of the information was in the book. I found better information from the official bootstrap documentation site.
Amazon Verified review Amazon
Ben Lanning Mar 31, 2018
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I was very disappointed in this book for two reasons.First, the quality of the ebook itself was quite low. Little to no effort had been made to ensure that the layout was correct after it was converted to the kindle format and many of the code blocks and images were very difficult to take advantage of due to their low quality, being overwritten by other content, or sloppy layout.And second, the actual content of the book was extremely lacking. I am primarily a hobbyist programmer, but have successfully taught myself a number of new languages and tech stacks as I needed them for a project. As a result I rely heavily on the official documentation of any given project or language. As a result I was very disappointed to find that the content of this book was mostly fluff and that it was, in almost every case, less helpful and informative than the actual bootstrap website with regard to layout help, examples, use cases, code snippets, and even general advice on planning and designing a web page. For a book titled "Mastering Bootstrap 4" I fully expected there to be more in depth and detailed information than I can find for free on the project website in about five minutes.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.