Bootstrap Overview: Silicus Training Name I V1.0 Silicus Technologies India PVT LTD © 2017 1
Bootstrap Overview: Silicus Training Name I V1.0 Silicus Technologies India PVT LTD © 2017 1
Bootstrap Overview: Silicus Training Name I V1.0 Silicus Technologies India PVT LTD © 2017 1
Bootstrap Overview
Silicus Training Name I V1.0 Silicus Technologies India Pvt Ltd © 2017 1
Training Name: Bootstrap
Trainer Name : Shilpi Saraogi
Responsive Design
What is Bootstrap
Why Bootstrap
How to start
Grid System
Responsive Utility Classes
Bootstrap Components
Bootstrap Plugins
Bootstrap Code Validation
Advantages
Limitations
Estimations & Costing
Bootstrap Alternatives
Bootstrap is an essential framework for creating responsive websites. Following are some
Objective of this training:
Target Audience
Experienced web designers
Experienced web developers
Training Pre-requisites
Working knowledge of HTML and CSS
To resize the page element most common concept is used in RW design is fluid grid.
It uses relative units like percentages.
RWD are implemented in different coding languages like PHP, .Net, Java and
many new technologies which supports RWD.
Media queries are most commonly used to set different CSS style for different
resolutions. It looks for the width of the browser to apply the appropriate size
based on the width defined.
Using power of HTML and CSS can implement RWD with ease, few of the features of
CSS and HTML allows you to resize images, screen resolution automatically.
Responsive website design works on the lower and upper limit to resize the website.
Most of the time the breakpoints are defined based on the width of the website,
if the website goes above or below of the break-point the appropriate web design
gets applied.
Silicus Training Name I V1.0 Silicus Technologies India Pvt Ltd © 2016 7
Bootstrap v4.0.0-alpha.6
Bootstrap 4 provided the following benefits;
Dropdown Structure Can be created with <ul> and <li> Can be created with <ul> or <div>
bootstrap/
├── css/
│ ├── bootstrap.css
│ ├── bootstrap.css.map
│ ├── bootstrap.min.css
│ ├── bootstrap.min.css.map
│ ├── bootstrap-grid.css
│ ├── bootstrap-grid.css.map
│ ├── bootstrap-grid.min.css
│ ├── bootstrap-grid.min.css.map
│ ├── bootstrap-reboot.css
│ ├── bootstrap-reboot.css.map
│ ├── bootstrap-reboot.min.css
│ └── bootstrap-reboot.min.css.map
└── js/
├── bootstrap.bundle.js
├── bootstrap.bundle.min.js
├── bootstrap.js
└── bootstrap.min.js
This is the most basic form of Bootstrap: precompiled files for quick drop-in usage in nearly any web project. We
provide compiled CSS and JS (bootstrap.*), as well as compiled and minified CSS and JS (bootstrap.min.*).
Silicus Training Name I V1.0 Silicus Technologies India Pvt Ltd © 2016 12
Bootstrap HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap 4 Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.
0-beta.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.
js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.6/umd/po
pper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-
beta.2/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h1>My First Bootstrap Page</h1>
<p>This is some text.</p>
</div>
</body>
</html>
Since Bootstrap is developed to be mobile first, we use a handful of media queries to create sensible breakpoints
for our layouts and interfaces.
Horizontal at all
Grid behavior Collapsed to start, horizontal above breakpoints
times
Max container
None (auto) 540px 720px 960px 1140px
width
# of columns 12
Nestable Yes
Offsets Yes
<div class="row">
<div class="col">col</div>
<div class="col">col</div>
<div class="col">col</div>
<div class="col">col</div>
</div>
<div class="row">
<div class="col-8">col-8</div>
<div class="col-4">col-4</div>
</div>
<div class="row">
<div class="col-sm-8">col-sm-8</div>
<div class="col-sm-4">col-sm-4</div>
</div>
<div class="row">
<div class="col-sm">col-sm</div>
<div class="col-sm">col-sm</div>
<div class="col-sm">col-sm</div>
</div>
<!-- Stack the columns on mobile by making one full-width and the
other half-width -->
<div class="row">
<div class="col col-md-8">.col .col-md-8</div>
<div class="col-6 col-md-4">.col-6 .col-md-4</div>
</div>
<!-- Columns start at 50% wide on mobile and bump up to 33.3% wide
on desktop -->
<div class="row">
<div class="col-6 col-md-4">.col-6 .col-md-4</div>
<div class="col-6 col-md-4">.col-6 .col-md-4</div>
<div class="col-6 col-md-4">.col-6 .col-md-4</div>
</div>
<!-- Columns are always 50% wide, on mobile and desktop -->
<div class="row">
<div class="col-6">.col-6</div>
<div class="col-6">.col-6</div>
</div>
Company Confidential
Silicus Training Name I V1.0 QMS-SEPG-TPL-095/3.0 21
Equal-width
Add any number of unit-less classes for each breakpoint you need and every column will be the same width & grid
layouts that apply to every device and viewport, from xs to xl.
<div class="container">
<div class="row">
<div class="col"> 1 of 2 </div>
<div class="col"> 1 of 2 </div>
</div>
<div class="row">
<div class="col"> 1 of 3 </div>
<div class="col"> 1 of 3 </div>
<div class="col"> 1 of 3 </div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col"> 1 of 3 </div>
<div class="col-6"> 2 of 3 (wider) </div>
<div class="col"> 3 of 3 </div>
</div> <div class="row">
<div class="col"> 1 of 3 </div>
<div class="col-5"> 2 of 3 (wider) </div>
<div class="col"> 3 of 3 </div>
</div>
</div>
<div class="container">
<div class="row justify-content-md-center">
<div class="col col-lg-2"> 1 of 3 </div>
<div class="col-12 col-md-auto"> Variable width content </div>
<div class="col col-lg-2"> 3 of 3 </div>
</div>
<div class="row">
<div class="col"> 1 of 3 </div>
<div class="col-12 col-md-auto"> Variable width content </div>
<div class="col col-lg-2"> 3 of 3 </div>
</div>
</div>
<div class="row">
<div class="col">col</div>
<div class="col">col</div>
<div class="w-100"></div>
<div class="col">col</div>
<div class="col">col</div>
</div>
Company Confidential
Silicus Training Name I V1.0 QMS-SEPG-TPL-095/3.0 26
Vertical alignment
Use flexbox alignment utilities to vertically and horizontally align columns.
<div class="container">
<div class="row align-items-start">
<div class="col"> One of three columns </div>
<div class="col"> One of three columns </div>
<div class="col"> One of three columns </div>
</div> <div class="row align-items-center">
<div class="col"> One of three columns </div>
<div class="col"> One of three columns </div>
<div class="col"> One of three columns </div>
</div>
<div class="row align-items-end">
<div class="col"> One of three columns </div>
<div class="col"> One of three columns </div>
<div class="col"> One of three columns </div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col align-self-start">One of three columns </div>
<div class="col align-self-center"> One of three columns </div>
<div class="col align-self-end"> One of three columns </div>
</div>
</div>
Company Confidential
Silicus Training Name I V1.0 QMS-SEPG-TPL-095/3.0 31
FLEX
Apply display utilities to create a flexbox container and transform direct children elements into flex items. Flex
containers and items are able to be modified further with additional flex properties.
Direction
Use .flex-row to set a horizontal direction or .flex-row-reverse to start the horizontal direction from the opposite side.
Use .flex-column to set a vertical direction, or .flex-column-reverse to start the vertical direction from the opposite side.
Justify content
Use justify-content utilities on flexbox containers to change the alignment of flex the main axis (the x-axis to start,
y-axis if flex-direction: column). Choose from start (browser default), end, center, betweeitems on n, or around.
Align items
Use align-items utilities on flexbox containers to change the alignment of flex items on the cross axis (the y-axis to start,
x-axis if flex-direction: column). Choose from start, end, center, baseline, or stretch(browser default).
Display in print
Class Print style
.d-print-block Applies display: block; to the element when printing
.d-print-inline Applies display: inline; to the element when printing
.d-print-inline-block Applies display: inline-block; to the element when
printing
.d-print-none Applies display: none; to the element when printing
Responsive
Responsive variations also exist for each float value.
<div class="float-sm-left">Float left on viewports sized SM (small) or wider</div><br>
<div class="float-md-left">Float left on viewports sized MD (medium) or wider</div><br>
<div class="float-lg-left">Float left on viewports sized LG (large) or wider</div><br>
<div class="float-xl-left">Float left on viewports sized XL (extra-large) or wider</div><br>
<div>
<div class="h-25 d-inline-block">Height 25%</div>
<div class="h-50 d-inline-block">Height 50%</div>
<div class="h-75 d-inline-block">Height 75%</div>
<div class="h-100 d-inline-block">Height 100%</div>
</div>
Company Confidential
Silicus Training Name I V1.0 QMS-SEPG-TPL-095/3.0 38
Bootstrap Table
Company Confidential
Silicus Training Name I V1.0 QMS-SEPG-TPL-095/3.0 40
Bootstrap Glyphicons
btn btn-primary Provides extra visual weight to indicate primary action button in a
set of buttons.
btn btn-info Can be used as an alternative to the default button.
Company Confidential
Silicus Training Name I V1.0 QMS-SEPG-TPL-095/3.0 44
Validating Bootstrap Code
One of the most challenging part of responsive website testing is to test the websites on all browsers,
resolutions, screen sizes and Operating Systems etc. However it is not realistic to test the website with all
above combinations.
viewport sizing option: By using this option you can change the size of the viewport to that of a
smartphone or a tablet and notice the responsiveness of the web design for that particular website. It is a
quick and very easy option available to test the responsiveness of the web design across the variable
viewport sizes of the multiple devices.
browser emulator: Browser emulators are great for testing a site's responsiveness, but they don’t emulate
differences in API, CSS support, and certain behaviors that you'd see on a mobile browser. Test your site
on browsers running on real devices to be certain everything behaves as expected.
Browser extensions: Responsiveness can also be tested by browser extensions such as Viewport Resizer,
Mobile/Responsive Web Design Tester for Chrome etc.
Responsive Design Mode (Firefox): Responsive Design Mode gives you a simple way to simulate these
factors, to test how your website will look and behave on different devices.
Changing the size of your browser: when you are testing the responsiveness of a web design, you can
easily check the compatibility by changing the size of your browser.
Online responsive checker: There are online free checker website available. You just need to put your
website URL and check for responsiveness. They are very easy to use and you can get results in less than
one minute.
Company Confidential
Silicus Training Name I V1.0 QMS-SEPG-TPL-095/3.0 48
Estimating and Costing
Thank You!