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
$9.99 $39.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
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
Estimated delivery fee Deliver to Ecuador

Standard delivery 10 - 13 business days

$19.95

Premium delivery 3 - 6 business days

$40.95
(Includes tracking information)

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 : 9781788834902
Vendor :
Bootstrap
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Ecuador

Standard delivery 10 - 13 business days

$19.95

Premium delivery 3 - 6 business days

$40.95
(Includes tracking information)

Product Details

Publication date : Feb 22, 2018
Length: 354 pages
Edition : 2nd
Language : English
ISBN-13 : 9781788834902
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 $5 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 $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 141.97
Learning jQuery 3
$43.99
Bootstrap 4 Cookbook
$48.99
Mastering Bootstrap 4
$48.99
Total $ 141.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

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela