SlideShare a Scribd company logo
Bootstrap (Responsive Web Design)
By Sarvesh Kushwaha
What we are going to cover ?
• Overview of Bootstrap
• Media Queries
• Getting Started
• Grid System
• Layouts
• Workshop
• Advantage and disadvantages
• Resources
Overview of Bootstrap
• Framework for Front-End development
• Open source project by twitter
• Responsive
• Mobile First approach
How they Achieved Responsiveness ?
• Using Media Queries in CSS3
• @media rule allows website to have a different layout for screen, mobile phone, tablet, etc.
• A @media query generally consists of a media type and at least one expression that limits
the style sheet's scope by using media features, such as width, height, and colour.
<!-- CSS media query on a link element -->
<link rel="stylesheet" media="(max-width: 800px)" href="example.css" />
<!-- CSS media query within a stylesheet -->
<style>
@media (max-width: 600px) {
.facet_sidebar {
display: none;
}
}
@media (min-width: 700px) and (orientation: landscape) { ... }
</style>
Getting Started
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]-->
</head>
<body>
<h1>Hello, world!</h1> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed --> <script
src="js/bootstrap.min.js"></script>
</body>
</html>
Take the latest version of IE, and don’t make us cry.
Render the content acc. to physical width of device.
At first load no zoom. Enable zooming using “user-
scalable” , “maximum-scale”.
Grid System
1. Extra small devices - Phones (<768px) - .col-xs-[num]
2. Small devices - Tablets (≥768px) - .col-sm-[num]
3. Medium devices - Desktops (≥992px) - .col-md-[num]
4. Large devices - Desktops (≥1200px)- .col-lg-[num]
Layout
• Two ways you can create a layout for your website i.e (Fixed and Fluid)
Responsive Utilities
Bootstrap workshop
• 3 Easy Steps :
1. Add container
2. Add row
3. Add column (Repeat 2 and 3)
• Responsive Tables
<div class="table-responsive">
<table class="table table-bordered">
...
</table>
</div>
Bootstrap workshop (Contd.)
• Forms
• Vertical Form (default form layout)
• Inline Form
• Horizontal Form
• Custom Form
Bootstrap workshop (Contd.)
• Default Form
<form>
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1"
placeholder="Email"> </div>
<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<input type="password" class="form-control"
id="exampleInputPassword1" placeholder="Password"> </div>
<div class="form-group">
<label for="exampleInputFile">File input</label>
<input type="file" id="exampleInputFile"> <p class="help-
block">Example block-level help text here.</p> </div>
<div class="checkbox">
<label> <input type="checkbox"> Check me out </label> </div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
Bootstrap workshop (Contd.)
• Inline Form
<form class="form-inline">
<div class="form-group">
<label class="sr-only" for="exampleInputEmail3">Email
address</label>
<input type="email" class="form-control" id="exampleInputEmail3"
placeholder="Email">
</div>
<div class="form-group">
<label class="sr-only"
for="exampleInputPassword3">Password</label>
<input type="password" class="form-control"
id="exampleInputPassword3" placeholder="Password">
</div>
<div class="checkbox"> <label> <input type="checkbox"> Remember
me </label>
</div>
<button type="submit" class="btn btn-default">Sign in</button>
</form>
Bootstrap workshop (Contd.)
• Horizontal Form
<form class="form-horizontal">
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">Email</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="inputEmail3"
placeholder="Email"> </div> </div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-2 control-
label">Password</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="inputPassword3"
placeholder="Password"> </div> </div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="checkbox"> <label> <input type="checkbox"> Remember
me </label> </div> </div> </div>
<div class="form-group"> <div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Sign in</button> </div>
</div>
</form>
Bootstrap workshop (Contd.)
• Custom Form
<form class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">Quarter</label>
<div class="col-md-10">
<input type="text" class="form-control">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Block
name/Number</label>
<div class="col-md-4">
<input type="text" class="form-control">
</div>
<label class="control-label col-sm-1">Entrance</label>
<div class="col-md-1">
<input type="text" class="form-control">
</div>
<label class="control-label col-sm-1">Floor</label>
<div class="col-md-1">
<input type="text" class="form-control">
</div>
<label class="control-label col-sm-1">Apartment</label>
<div class="col-md-1">
<input type="text" class="form-control">
</div>
</div>
</form>
http://www.bootply.com/hviqAhBCaV
Advantage and Disadvantage
• Advantages
• works in all modern browsers (IE9+ , Chrome , Safari , Mozilla ..)
• Rapid Development
• Fully and easily customizable
• Comes with jquery plugins
• Disadvantages
• My new website looks just like everyone else’s !
• No backward compatibility in between versions
• Using Bootstrap for existing websites is a tedious task
Resources
• Bootstrap Online Editor
• Codeply
• Bootply
• JsFiddle
• Pure Responsive table
• Foo Table
• Bootstrap Snippets
• Bootsnipp
• Bootbundle
• Snipplicious
• Bootstrap calendar
• Bootstrap Resources
• http://startbootstrap.com/bootstrap-resources/
Sarvesh Kushwaha | | | | | |

More Related Content

ODP
Introduction of Html/css/js
PPTX
HTML5 audio & video
PDF
CSS3, Media Queries, and Responsive Design
PPT
Web Fundamentals
PDF
Modern Web Development
PDF
CSS3 Media Queries
PDF
GET and POST in PHP
PPTX
Bootstrap PPT by Mukesh
Introduction of Html/css/js
HTML5 audio & video
CSS3, Media Queries, and Responsive Design
Web Fundamentals
Modern Web Development
CSS3 Media Queries
GET and POST in PHP
Bootstrap PPT by Mukesh

What's hot (20)

PPT
PHP Project PPT
PPTX
Introduction to HTTP protocol
PPTX
Html5
PPT
Web Development using HTML & CSS
PPTX
Uploading a file with php
PPT
PPTX
Web fundamentals - part 1
PPT
Html basics
PPTX
Lab #2: Introduction to Javascript
PPTX
Html formatting
PDF
Javascript essentials
PPT
Introduction to HTML5
PPTX
PDF
Intro to HTML and CSS basics
PPTX
Bootstrap ppt
PPTX
Html audio video
PDF
JavaScript - Chapter 13 - Browser Object Model(BOM)
PPT
PDF
Bootstrap
PHP Project PPT
Introduction to HTTP protocol
Html5
Web Development using HTML & CSS
Uploading a file with php
Web fundamentals - part 1
Html basics
Lab #2: Introduction to Javascript
Html formatting
Javascript essentials
Introduction to HTML5
Intro to HTML and CSS basics
Bootstrap ppt
Html audio video
JavaScript - Chapter 13 - Browser Object Model(BOM)
Bootstrap
Ad

Viewers also liked (20)

PPT
Start-ups, incubators and technology transfer: lessons learned from previous ...
PDF
User acquisition for startups
PPTX
Capitalists And Activists (bilpil2009)
PDF
Simetrica Labs - Our model
PPTX
How to evaluate an offer from a startup incubator
PDF
[InDMF 2013] Indra Purnama - Incubator Role in Startup Industry
PDF
Accelerators and Incubators
PDF
The accelerator and incubator ecosystem in Europe (2013)
PDF
Accelerator vs Incubator
PPTX
Marketing for Startup Incubator - January 2012
PDF
Incubator and startup 2
PDF
Brand design essentials for startups - A presentation by Manoj Kothari at IPF...
PDF
Incubators, Accelerators and Startups - From a Founder Perspective @ Startup ...
PDF
Tehnopol Startup Incubator
PDF
How to close an angel round - Teaser
PDF
Role Of Angel Investment
PDF
VC signaling in seed rounds
PDF
BDV sebagai Incubator Startup (Johannes - BDV Telkom)
PDF
Incubator, Accelerator Deck
PDF
Joshua Slayton
Start-ups, incubators and technology transfer: lessons learned from previous ...
User acquisition for startups
Capitalists And Activists (bilpil2009)
Simetrica Labs - Our model
How to evaluate an offer from a startup incubator
[InDMF 2013] Indra Purnama - Incubator Role in Startup Industry
Accelerators and Incubators
The accelerator and incubator ecosystem in Europe (2013)
Accelerator vs Incubator
Marketing for Startup Incubator - January 2012
Incubator and startup 2
Brand design essentials for startups - A presentation by Manoj Kothari at IPF...
Incubators, Accelerators and Startups - From a Founder Perspective @ Startup ...
Tehnopol Startup Incubator
How to close an angel round - Teaser
Role Of Angel Investment
VC signaling in seed rounds
BDV sebagai Incubator Startup (Johannes - BDV Telkom)
Incubator, Accelerator Deck
Joshua Slayton
Ad

Similar to Bootstrap (20)

PPTX
Web Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tables
PDF
CSS framework By Palash
PPTX
Bootstrap 3
PPSX
Introduction to Html5
PDF
iWebkit
PDF
Bootstrap 3 Cheat Sheet PDF Reference
PDF
Introduction to Bootstrap
PPTX
Create Responsive Website Design with Bootstrap 3
PDF
Design Systems, Pattern Libraries & WordPress
PPTX
Introduction to Bootstrap
PPTX
Getting to Know Bootstrap for Rapid Web Development
PPTX
Bootstrap
PPTX
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
TXT
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
DOCX
“Good design is obvious. Great design is transparent.” — How we use Bootstrap...
PDF
integrasi template admin lte terbaru dengan laravel 7
PDF
20190118_NetadashiMeetup#8_React2019
KEY
Slow kinda sucks
PDF
Pemrograman Web 4 - Bootstrap 3
PPTX
Web Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tables
CSS framework By Palash
Bootstrap 3
Introduction to Html5
iWebkit
Bootstrap 3 Cheat Sheet PDF Reference
Introduction to Bootstrap
Create Responsive Website Design with Bootstrap 3
Design Systems, Pattern Libraries & WordPress
Introduction to Bootstrap
Getting to Know Bootstrap for Rapid Web Development
Bootstrap
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
“Good design is obvious. Great design is transparent.” — How we use Bootstrap...
integrasi template admin lte terbaru dengan laravel 7
20190118_NetadashiMeetup#8_React2019
Slow kinda sucks
Pemrograman Web 4 - Bootstrap 3

Bootstrap

  • 1. Bootstrap (Responsive Web Design) By Sarvesh Kushwaha
  • 2. What we are going to cover ? • Overview of Bootstrap • Media Queries • Getting Started • Grid System • Layouts • Workshop • Advantage and disadvantages • Resources
  • 3. Overview of Bootstrap • Framework for Front-End development • Open source project by twitter • Responsive • Mobile First approach
  • 4. How they Achieved Responsiveness ? • Using Media Queries in CSS3 • @media rule allows website to have a different layout for screen, mobile phone, tablet, etc. • A @media query generally consists of a media type and at least one expression that limits the style sheet's scope by using media features, such as width, height, and colour. <!-- CSS media query on a link element --> <link rel="stylesheet" media="(max-width: 800px)" href="example.css" /> <!-- CSS media query within a stylesheet --> <style> @media (max-width: 600px) { .facet_sidebar { display: none; } } @media (min-width: 700px) and (orientation: landscape) { ... } </style>
  • 5. Getting Started <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <!-- Bootstrap --> <link href="css/bootstrap.min.css" rel="stylesheet"> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <h1>Hello, world!</h1> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="js/bootstrap.min.js"></script> </body> </html> Take the latest version of IE, and don’t make us cry. Render the content acc. to physical width of device. At first load no zoom. Enable zooming using “user- scalable” , “maximum-scale”.
  • 6. Grid System 1. Extra small devices - Phones (<768px) - .col-xs-[num] 2. Small devices - Tablets (≥768px) - .col-sm-[num] 3. Medium devices - Desktops (≥992px) - .col-md-[num] 4. Large devices - Desktops (≥1200px)- .col-lg-[num]
  • 7. Layout • Two ways you can create a layout for your website i.e (Fixed and Fluid)
  • 9. Bootstrap workshop • 3 Easy Steps : 1. Add container 2. Add row 3. Add column (Repeat 2 and 3) • Responsive Tables <div class="table-responsive"> <table class="table table-bordered"> ... </table> </div>
  • 10. Bootstrap workshop (Contd.) • Forms • Vertical Form (default form layout) • Inline Form • Horizontal Form • Custom Form
  • 11. Bootstrap workshop (Contd.) • Default Form <form> <div class="form-group"> <label for="exampleInputEmail1">Email address</label> <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Email"> </div> <div class="form-group"> <label for="exampleInputPassword1">Password</label> <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password"> </div> <div class="form-group"> <label for="exampleInputFile">File input</label> <input type="file" id="exampleInputFile"> <p class="help- block">Example block-level help text here.</p> </div> <div class="checkbox"> <label> <input type="checkbox"> Check me out </label> </div> <button type="submit" class="btn btn-default">Submit</button> </form>
  • 12. Bootstrap workshop (Contd.) • Inline Form <form class="form-inline"> <div class="form-group"> <label class="sr-only" for="exampleInputEmail3">Email address</label> <input type="email" class="form-control" id="exampleInputEmail3" placeholder="Email"> </div> <div class="form-group"> <label class="sr-only" for="exampleInputPassword3">Password</label> <input type="password" class="form-control" id="exampleInputPassword3" placeholder="Password"> </div> <div class="checkbox"> <label> <input type="checkbox"> Remember me </label> </div> <button type="submit" class="btn btn-default">Sign in</button> </form>
  • 13. Bootstrap workshop (Contd.) • Horizontal Form <form class="form-horizontal"> <div class="form-group"> <label for="inputEmail3" class="col-sm-2 control-label">Email</label> <div class="col-sm-10"> <input type="email" class="form-control" id="inputEmail3" placeholder="Email"> </div> </div> <div class="form-group"> <label for="inputPassword3" class="col-sm-2 control- label">Password</label> <div class="col-sm-10"> <input type="password" class="form-control" id="inputPassword3" placeholder="Password"> </div> </div> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <div class="checkbox"> <label> <input type="checkbox"> Remember me </label> </div> </div> </div> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <button type="submit" class="btn btn-default">Sign in</button> </div> </div> </form>
  • 14. Bootstrap workshop (Contd.) • Custom Form <form class="form-horizontal"> <div class="form-group"> <label class="control-label col-sm-2">Quarter</label> <div class="col-md-10"> <input type="text" class="form-control"> </div> </div> <div class="form-group"> <label class="control-label col-sm-2">Block name/Number</label> <div class="col-md-4"> <input type="text" class="form-control"> </div> <label class="control-label col-sm-1">Entrance</label> <div class="col-md-1"> <input type="text" class="form-control"> </div> <label class="control-label col-sm-1">Floor</label> <div class="col-md-1"> <input type="text" class="form-control"> </div> <label class="control-label col-sm-1">Apartment</label> <div class="col-md-1"> <input type="text" class="form-control"> </div> </div> </form> http://www.bootply.com/hviqAhBCaV
  • 15. Advantage and Disadvantage • Advantages • works in all modern browsers (IE9+ , Chrome , Safari , Mozilla ..) • Rapid Development • Fully and easily customizable • Comes with jquery plugins • Disadvantages • My new website looks just like everyone else’s ! • No backward compatibility in between versions • Using Bootstrap for existing websites is a tedious task
  • 16. Resources • Bootstrap Online Editor • Codeply • Bootply • JsFiddle • Pure Responsive table • Foo Table • Bootstrap Snippets • Bootsnipp • Bootbundle • Snipplicious • Bootstrap calendar • Bootstrap Resources • http://startbootstrap.com/bootstrap-resources/
  • 17. Sarvesh Kushwaha | | | | | |