SlideShare a Scribd company logo
1 of 24
By Yaowaluck Promdee, Dr.Sumonta Kasemvilas
Bootstrap is the most popular HTML, CSS and JS framework for
developing responsive, mobile first projects on the web.
Web Design Technology 1
Web Design Technology 2
What is Bootstrap?
• Scaffolding – grid system
• Base CSS – typography, tables, forms, images
• Components – navigation, breadcrumbs, pagination
• JavaScript – jQuery plugins
Web Design Technology 3
Why use Bootstrap?
• Easy to use
• Responsive features
• Mobile-first approach
• Browser compatibility
Web Design Technology 4
Get Started Bootstrap
• Download Bootstrap from
getbootstrap.com
• Include Bootstrap from a CDN
Web Design Technology 5
Bootstrap CDN
• Download form a CND (Content Delivery Network)
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet"
href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!-- jQuery library -->
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script
src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></scri
pt> Web Design Technology 6
Web Design Technology 7
Download Bootstrap
Bootstrap
Compiled and minified
CSS, JavaScript, and
fonts. No docs or
original source files are
included.
Source code
Source Less, JavaScript,
and font files, along with
our docs. Requires a
Less compiler and
some setup.
Sass
Bootstrap ported from
Less to Sass for easy
inclusion in Rails,
Compass, or Sass-
only projects.
Create Webpage with Bootstrap
1. Add the HTML5 doctype
2. Bootstrap 3 is mobile-first
<meta name="viewport" content="width=device-width, initial-scale=1">
The part sets the width of the page to follow the
screen-width of the device (which will vary depending on the device).
The part sets the initial zoom level when the page is first
loaded by the browser.
Web Design Technology 8
Create Webpage with Bootstrap
3. Containers
Bootstrap also requires a containing element to wrap site contents.
There are two container classes to choose from:
The .container class provides a responsive fixed width container
The .container-fluid class provides a full width container, spanning the entire
width of the viewport
Web Design Technology 9
Grid system
Extra small devices
Phones (<768px)
Small devices
tablet (>=768px)
Medium devices
Desktops
(>=992px)
Large devices
Desktop
(>=1200px)
Grid behavior Horizontal at all times Collapsed to start, horizontal above breakpoint
Max container
width
None(auto) 750pz 970pz 1170px
Class prefix .col-xs- .col-sm- .col-md- .col-lg-
# of columns 12
Gutter width 30px (15px on each side of column)
Max column width Auto 60px 78px 95px
Offsets/Column
ordering
N/A Yes
Web Design Technology 10
Grid system
<div class="container-fluid">
<div class="row">
<div class="col-md-8">.col-md-8</div>
<div class="col-md-4">.col-md-4</div>
</div></div>
Web Design Technology 11
Grid system
For Mobile and Desktop
<!-- Columns start at 50% wide on mobile and bump up to 33.3% wide on desktop -->
<div class="row">
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
<div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
</div>
Web Design Technology 12
Responsive tables
.table /.table-striped / .table-bordered/ .table-hover
<body>
<div class="container">
<table class="table table-striped”>
…<!– Table here -->
</table>
</div>
</body>
…
…
<head>
<meta name="viewport" content="width=device-width,
initial-scale=1">
<link rel="stylesheet"
href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/
css/bootstrap.min.css">
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.
3/jquery.min.js"></script>
<script
src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/j
s/bootstrap.min.js"></script>
</head>
Web Design Technology 13
Bootstrap Images
Image shapes
<img src="..." alt="..." class="img-rounded">
<img src="..." alt="..." class="img-circle">
<img src="..." alt="..." class="img-thumbnail">
Web Design Technology 14
Bootstrap Pager
Pager is also a form of pagination (as described in the previous chapter).
Pager provides previous and next buttons (links).
To create previous/next buttons, add the .pager class to an <ul> element:
<ul class="pager">
<li><a href="#">Previous</a></li>
<li><a href="#">Next</a></li>
</ul>
Align Buttons
Use the .previous and .next classes to align each button to the sides of the
page
Web Design Technology 15
Navigation Bars
Bootstrap Navigation bar
A standard navigation bar is created with <nav class=“navbar-default”>
Just change the .navbar-default class into .navbar-inverse
The .navbar-fixed-top class makes the navigation bar fixed at the top
Web Design Technology 16
Bootstrap Forms
Standard rules for all three form
layouts:
• Always use <form role="form">
(helps improve accessibility for
people using screen readers)
• Wrap labels and form controls in
<div class="form-group"> (needed
for optimum spacing)
• Add class .form-control to all
textual <input>, <textarea>, and
<select> elements
Web Design Technology 17
Components
Glyphicons
<button type="button" class="btn btn-
default" aria-label="Left Align">
<span class="glyphicon glyphicon-
align-left" aria-hidden="true"></span>
</button>
Web Design Technology 18
Breadcrumbs
Indicate the current page's location within a navigational hierarchy
Separators are automatically added in CSS through :before and content.
class breadcrumb
<ol class="breadcrumb">
<li><a href="#">Home</a></li>
<li><a href="#">Library</a></li>
<li class="active">Data</li>
</ol>
Web Design Technology 19
Custom content
<div class="row">
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<img src="..." alt="...">
<div class="caption">
<h3>Thumbnail label</h3>
<p>...</p>
<p><a href="#" class="btn btn-primary"
role="button">Button</a> <a href="#"
class="btn btn-default"
role="button">Button</a></p>
</div>
</div>
</div>
</div>
Web Design Technology 20
Using the framework
Web Design Technology 21
Starter template
Nothing but the basics:
compiled CSS and
JavaScript along with a
container.
Bootstrap theme
Load the optional Bootstrap
theme for a visually
enhanced experience.
Grids
Multiple examples of grid
layouts with all four tiers,
nesting, and more.
Using the framework
Web Design Technology 22
Jumbotron
Build around the jumbotron
with a navbar and some basic
grid columns.
Narrow jumbotron
Build a more custom page by
narrowing the default container
and jumbotron..
Bootstrap Case
Reference: w3shools.com, getbootstrap.com
Web Design Technology 23
Assignment
Create a web page to present
“Principles of Web Design”
from information provided using Bootstrap
In hours time
Web Design Technology 24

More Related Content

What's hot

What's hot (20)

Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 
Bootstrap 3
Bootstrap 3Bootstrap 3
Bootstrap 3
 
An introduction to bootstrap
An introduction to bootstrapAn introduction to bootstrap
An introduction to bootstrap
 
Javascript
JavascriptJavascript
Javascript
 
Bootstrap ppt
Bootstrap pptBootstrap ppt
Bootstrap ppt
 
Bootstrap ppt
Bootstrap pptBootstrap ppt
Bootstrap ppt
 
Web development
Web developmentWeb development
Web development
 
Web development using HTML and CSS
Web development using HTML and CSSWeb development using HTML and CSS
Web development using HTML and CSS
 
Bootstrap Part - 1
Bootstrap Part - 1Bootstrap Part - 1
Bootstrap Part - 1
 
Bootstrap - Basics
Bootstrap - BasicsBootstrap - Basics
Bootstrap - Basics
 
Jquery
JqueryJquery
Jquery
 
Bootstrap 3
Bootstrap 3Bootstrap 3
Bootstrap 3
 
Bootstrap PPT Part - 2
Bootstrap PPT Part - 2Bootstrap PPT Part - 2
Bootstrap PPT Part - 2
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
CSS Grid
CSS GridCSS Grid
CSS Grid
 
Setting up your development environment
Setting up your development environmentSetting up your development environment
Setting up your development environment
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
Intro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS PropertyIntro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS Property
 
Tomcat server
 Tomcat server Tomcat server
Tomcat server
 
javaScript.ppt
javaScript.pptjavaScript.ppt
javaScript.ppt
 

Viewers also liked

Viewers also liked (20)

Giới thiệu cách sử dụng Bootstrap CSS Framework
Giới thiệu cách sử dụng Bootstrap CSS FrameworkGiới thiệu cách sử dụng Bootstrap CSS Framework
Giới thiệu cách sử dụng Bootstrap CSS Framework
 
Web Interface
Web InterfaceWeb Interface
Web Interface
 
Style and Selector
Style and SelectorStyle and Selector
Style and Selector
 
Game design
Game designGame design
Game design
 
The Technology Springboard: How Law Librarians Can Bootstrap Their Future
The Technology Springboard: How Law Librarians Can Bootstrap Their FutureThe Technology Springboard: How Law Librarians Can Bootstrap Their Future
The Technology Springboard: How Law Librarians Can Bootstrap Their Future
 
Internship - Bootstrap
Internship - BootstrapInternship - Bootstrap
Internship - Bootstrap
 
Navigation and Link
Navigation and LinkNavigation and Link
Navigation and Link
 
Tables and forms with HTML, CSS
Tables and forms with HTML, CSS  Tables and forms with HTML, CSS
Tables and forms with HTML, CSS
 
HTML 5
HTML 5HTML 5
HTML 5
 
Style and Selector Part2
Style and Selector Part2Style and Selector Part2
Style and Selector Part2
 
Twitter Bootstrap
Twitter BootstrapTwitter Bootstrap
Twitter Bootstrap
 
Twitter Bootstrap for web UI development
Twitter Bootstrap for web UI development Twitter Bootstrap for web UI development
Twitter Bootstrap for web UI development
 
Twitter bootstrap (css, components and javascript)
Twitter bootstrap (css, components and javascript)Twitter bootstrap (css, components and javascript)
Twitter bootstrap (css, components and javascript)
 
Overview HTML, HTML5 and Validations
Overview HTML, HTML5 and Validations Overview HTML, HTML5 and Validations
Overview HTML, HTML5 and Validations
 
Presentation on Bootstrap Course
Presentation on Bootstrap CoursePresentation on Bootstrap Course
Presentation on Bootstrap Course
 
Bootstrap Study Share
Bootstrap Study ShareBootstrap Study Share
Bootstrap Study Share
 
Observation and interviewing
Observation and interviewingObservation and interviewing
Observation and interviewing
 
BÀI 3 Bố cục trang web & bảng (TABLE) trên trang web - Giáo trình FPT
BÀI 3 Bố cục trang web & bảng (TABLE) trên trang web - Giáo trình FPTBÀI 3 Bố cục trang web & bảng (TABLE) trên trang web - Giáo trình FPT
BÀI 3 Bố cục trang web & bảng (TABLE) trên trang web - Giáo trình FPT
 
CSS Font & Text style
CSS Font & Text style CSS Font & Text style
CSS Font & Text style
 
Intro To Twitter Bootstrap
Intro To Twitter BootstrapIntro To Twitter Bootstrap
Intro To Twitter Bootstrap
 

Similar to Bootstrap Framework

Lect-4-Responsive-Web-06032024-082044am.pptx
Lect-4-Responsive-Web-06032024-082044am.pptxLect-4-Responsive-Web-06032024-082044am.pptx
Lect-4-Responsive-Web-06032024-082044am.pptx
zainm7032
 
Responsive UX - One size fits all @BigDesign conference #BigD12
Responsive UX - One size fits all   @BigDesign conference #BigD12Responsive UX - One size fits all   @BigDesign conference #BigD12
Responsive UX - One size fits all @BigDesign conference #BigD12
touchtitans
 
Responsive Web Design for Universal Access
Responsive Web Design for Universal AccessResponsive Web Design for Universal Access
Responsive Web Design for Universal Access
Kate Walser
 

Similar to Bootstrap Framework (20)

Bootstrap
Bootstrap Bootstrap
Bootstrap
 
Create Responsive Website Design with Bootstrap 3
Create Responsive Website Design with Bootstrap 3Create Responsive Website Design with Bootstrap 3
Create Responsive Website Design with Bootstrap 3
 
ResponsiveWebDesign
ResponsiveWebDesignResponsiveWebDesign
ResponsiveWebDesign
 
BOTSTRAP.ppt
BOTSTRAP.pptBOTSTRAP.ppt
BOTSTRAP.ppt
 
Css responsive
Css responsiveCss responsive
Css responsive
 
Responsive Websites
Responsive WebsitesResponsive Websites
Responsive Websites
 
Bootstrap [part 1]
Bootstrap [part 1]Bootstrap [part 1]
Bootstrap [part 1]
 
Bootstrap과 UI-Bootstrap
Bootstrap과 UI-BootstrapBootstrap과 UI-Bootstrap
Bootstrap과 UI-Bootstrap
 
Lect-4-Responsive-Web-06032024-082044am.pptx
Lect-4-Responsive-Web-06032024-082044am.pptxLect-4-Responsive-Web-06032024-082044am.pptx
Lect-4-Responsive-Web-06032024-082044am.pptx
 
Responsive UX - One size fits all @BigDesign conference #BigD12
Responsive UX - One size fits all   @BigDesign conference #BigD12Responsive UX - One size fits all   @BigDesign conference #BigD12
Responsive UX - One size fits all @BigDesign conference #BigD12
 
HTML & CSS #10 : Bootstrap
HTML & CSS #10 : BootstrapHTML & CSS #10 : Bootstrap
HTML & CSS #10 : Bootstrap
 
Boot strap
Boot strapBoot strap
Boot strap
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
 
Intro to Bootstrap
Intro to BootstrapIntro to Bootstrap
Intro to Bootstrap
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
Anvesh_BOOTSTRAP.pptx
Anvesh_BOOTSTRAP.pptxAnvesh_BOOTSTRAP.pptx
Anvesh_BOOTSTRAP.pptx
 
Responsive Web Design for Universal Access
Responsive Web Design for Universal AccessResponsive Web Design for Universal Access
Responsive Web Design for Universal Access
 
Html5 Whats around the bend
Html5 Whats around the bendHtml5 Whats around the bend
Html5 Whats around the bend
 
Pemrograman Web 4 - Bootstrap 3
Pemrograman Web 4 - Bootstrap 3Pemrograman Web 4 - Bootstrap 3
Pemrograman Web 4 - Bootstrap 3
 
Responsive WordPress workflow
Responsive WordPress workflowResponsive WordPress workflow
Responsive WordPress workflow
 

More from Yaowaluck Promdee

More from Yaowaluck Promdee (20)

A basic of UX for beginner
A basic of UX for beginnerA basic of UX for beginner
A basic of UX for beginner
 
TCAS 2563
TCAS 2563TCAS 2563
TCAS 2563
 
Portfolio design
Portfolio designPortfolio design
Portfolio design
 
Concept to creation story and storyboard
Concept to creation  story and storyboard Concept to creation  story and storyboard
Concept to creation story and storyboard
 
Requirement gathering-and-lean-canvas
Requirement gathering-and-lean-canvasRequirement gathering-and-lean-canvas
Requirement gathering-and-lean-canvas
 
Good bad design
Good bad designGood bad design
Good bad design
 
Graphic, Color and tools
Graphic, Color and toolsGraphic, Color and tools
Graphic, Color and tools
 
Page layouts flexible and fixed layout with CSS
Page layouts flexible and fixed layout with CSSPage layouts flexible and fixed layout with CSS
Page layouts flexible and fixed layout with CSS
 
CSS Boc model
CSS Boc model CSS Boc model
CSS Boc model
 
Design sitemap
Design sitemapDesign sitemap
Design sitemap
 
Good/Bad Web Design
Good/Bad Web DesignGood/Bad Web Design
Good/Bad Web Design
 
Powerpoint
Powerpoint Powerpoint
Powerpoint
 
Program Interface
Program Interface Program Interface
Program Interface
 
Mobile Interface
Mobile Interface   Mobile Interface
Mobile Interface
 
Personas and scenario
Personas and scenarioPersonas and scenario
Personas and scenario
 
Ux design process
Ux design processUx design process
Ux design process
 
Graphic Design
Graphic Design Graphic Design
Graphic Design
 
Lab#2 illustrator
Lab#2 illustratorLab#2 illustrator
Lab#2 illustrator
 
Good/Bad Design
Good/Bad DesignGood/Bad Design
Good/Bad Design
 
Content management system
Content management systemContent management system
Content management system
 

Recently uploaded

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 

Recently uploaded (20)

How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 

Bootstrap Framework

  • 1. By Yaowaluck Promdee, Dr.Sumonta Kasemvilas Bootstrap is the most popular HTML, CSS and JS framework for developing responsive, mobile first projects on the web. Web Design Technology 1
  • 3. What is Bootstrap? • Scaffolding – grid system • Base CSS – typography, tables, forms, images • Components – navigation, breadcrumbs, pagination • JavaScript – jQuery plugins Web Design Technology 3
  • 4. Why use Bootstrap? • Easy to use • Responsive features • Mobile-first approach • Browser compatibility Web Design Technology 4
  • 5. Get Started Bootstrap • Download Bootstrap from getbootstrap.com • Include Bootstrap from a CDN Web Design Technology 5
  • 6. Bootstrap CDN • Download form a CND (Content Delivery Network) <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <!-- jQuery library --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <!-- Latest compiled JavaScript --> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></scri pt> Web Design Technology 6
  • 7. Web Design Technology 7 Download Bootstrap Bootstrap Compiled and minified CSS, JavaScript, and fonts. No docs or original source files are included. Source code Source Less, JavaScript, and font files, along with our docs. Requires a Less compiler and some setup. Sass Bootstrap ported from Less to Sass for easy inclusion in Rails, Compass, or Sass- only projects.
  • 8. Create Webpage with Bootstrap 1. Add the HTML5 doctype 2. Bootstrap 3 is mobile-first <meta name="viewport" content="width=device-width, initial-scale=1"> The part sets the width of the page to follow the screen-width of the device (which will vary depending on the device). The part sets the initial zoom level when the page is first loaded by the browser. Web Design Technology 8
  • 9. Create Webpage with Bootstrap 3. Containers Bootstrap also requires a containing element to wrap site contents. There are two container classes to choose from: The .container class provides a responsive fixed width container The .container-fluid class provides a full width container, spanning the entire width of the viewport Web Design Technology 9
  • 10. Grid system Extra small devices Phones (<768px) Small devices tablet (>=768px) Medium devices Desktops (>=992px) Large devices Desktop (>=1200px) Grid behavior Horizontal at all times Collapsed to start, horizontal above breakpoint Max container width None(auto) 750pz 970pz 1170px Class prefix .col-xs- .col-sm- .col-md- .col-lg- # of columns 12 Gutter width 30px (15px on each side of column) Max column width Auto 60px 78px 95px Offsets/Column ordering N/A Yes Web Design Technology 10
  • 11. Grid system <div class="container-fluid"> <div class="row"> <div class="col-md-8">.col-md-8</div> <div class="col-md-4">.col-md-4</div> </div></div> Web Design Technology 11
  • 12. Grid system For Mobile and Desktop <!-- Columns start at 50% wide on mobile and bump up to 33.3% wide on desktop --> <div class="row"> <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div> <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div> <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div> </div> Web Design Technology 12
  • 13. Responsive tables .table /.table-striped / .table-bordered/ .table-hover <body> <div class="container"> <table class="table table-striped”> …<!– Table here --> </table> </div> </body> … … <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/ css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11. 3/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/j s/bootstrap.min.js"></script> </head> Web Design Technology 13
  • 14. Bootstrap Images Image shapes <img src="..." alt="..." class="img-rounded"> <img src="..." alt="..." class="img-circle"> <img src="..." alt="..." class="img-thumbnail"> Web Design Technology 14
  • 15. Bootstrap Pager Pager is also a form of pagination (as described in the previous chapter). Pager provides previous and next buttons (links). To create previous/next buttons, add the .pager class to an <ul> element: <ul class="pager"> <li><a href="#">Previous</a></li> <li><a href="#">Next</a></li> </ul> Align Buttons Use the .previous and .next classes to align each button to the sides of the page Web Design Technology 15
  • 16. Navigation Bars Bootstrap Navigation bar A standard navigation bar is created with <nav class=“navbar-default”> Just change the .navbar-default class into .navbar-inverse The .navbar-fixed-top class makes the navigation bar fixed at the top Web Design Technology 16
  • 17. Bootstrap Forms Standard rules for all three form layouts: • Always use <form role="form"> (helps improve accessibility for people using screen readers) • Wrap labels and form controls in <div class="form-group"> (needed for optimum spacing) • Add class .form-control to all textual <input>, <textarea>, and <select> elements Web Design Technology 17
  • 18. Components Glyphicons <button type="button" class="btn btn- default" aria-label="Left Align"> <span class="glyphicon glyphicon- align-left" aria-hidden="true"></span> </button> Web Design Technology 18
  • 19. Breadcrumbs Indicate the current page's location within a navigational hierarchy Separators are automatically added in CSS through :before and content. class breadcrumb <ol class="breadcrumb"> <li><a href="#">Home</a></li> <li><a href="#">Library</a></li> <li class="active">Data</li> </ol> Web Design Technology 19
  • 20. Custom content <div class="row"> <div class="col-sm-6 col-md-4"> <div class="thumbnail"> <img src="..." alt="..."> <div class="caption"> <h3>Thumbnail label</h3> <p>...</p> <p><a href="#" class="btn btn-primary" role="button">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p> </div> </div> </div> </div> Web Design Technology 20
  • 21. Using the framework Web Design Technology 21 Starter template Nothing but the basics: compiled CSS and JavaScript along with a container. Bootstrap theme Load the optional Bootstrap theme for a visually enhanced experience. Grids Multiple examples of grid layouts with all four tiers, nesting, and more.
  • 22. Using the framework Web Design Technology 22 Jumbotron Build around the jumbotron with a navbar and some basic grid columns. Narrow jumbotron Build a more custom page by narrowing the default container and jumbotron..
  • 23. Bootstrap Case Reference: w3shools.com, getbootstrap.com Web Design Technology 23
  • 24. Assignment Create a web page to present “Principles of Web Design” from information provided using Bootstrap In hours time Web Design Technology 24

Editor's Notes

  1. Bootstrap is a free front-end framework for faster and easier web development Bootstrap includes HTML and CSS based design templates for typography, forms, buttons, tables, navigation, modals, image carousels and many other, as well as optional JavaScript plugins Bootstrap also gives you the ability to easily create responsive designs
  2. Easy to use: Anybody with just basic knowledge of HTML and CSS can start using Bootstrap Responsive features: Bootstrap's responsive CSS adjusts to phones, tablets, and desktops Mobile-first approach: In Bootstrap 3, mobile-first styles are part of the core framework Browser compatibility: Bootstrap is compatible with all modern browsers (Chrome, Firefox, Internet Explorer, Safari, and Opera)
  3. If you don't want to download and host Bootstrap yourself, you can include it from a CDN (Content Delivery Network). MaxCDN provide CDN support for Bootstrap's CSS and JavaScript. Also include jQuery:
  4. Bootstrap (currently v3.3.5) has a few easy ways to quickly get started, each one appealing to a different skill level and use case. Read through to see what suits your particular needs.
  5. Bootstrap uses HTML elements and CSS properties that require the HTML5 doctype. Always include the HTML5 doctype at the beginning of the page, along with the lang attribute and the correct character set: Bootstrap 3 is designed to be responsive to mobile devices. Mobile-first styles are part of the core framework. To ensure proper rendering and touch zooming, add the following <meta> tag inside the <head> element:
  6. Note: Containers are not nestable (you cannot put a container inside another container).
  7. Bootstrap includes a responsive, mobile first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases. It includes predefined classes for easy layout options, as well as powerful mixins for generating more semantic layouts. Grid systems are used for creating page layouts through a series of rows and columns that house your content. Here's how the Bootstrap grid system works: Rows must be placed within a .container (fixed-width) or .container-fluid (full-width) for proper alignment and padding. Use rows to create horizontal groups of columns. Content should be placed within columns, and only columns may be immediate children of rows. Predefined grid classes like .row and .col-xs-4 are available for quickly making grid layouts. Less mixins can also be used for more semantic layouts. Columns create gutters (gaps between column content) via padding. That padding is offset in rows for the first and last column via negative margin on .rows. The negative margin is why the examples below are outdented. It's so that content within grid columns is lined up with non-grid content. Grid columns are created by specifying the number of twelve available columns you wish to span. For example, three equal columns would use three .col-xs-4. If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line. Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override grid classes targeted at smaller devices. Therefore, e.g. applying any .col-md-* class to an element will not only affect its styling on medium devices but also on large devices if a .col-lg-* class is not present. Look to the examples for applying these principles to your code.
  8. Using a single set of .col-md-* grid classes, you can create a basic grid system that starts out stacked on mobile devices and tablet devices (the extra small to small range) before becoming horizontal on desktop (medium) devices. Place grid columns in any .row.
  9. Using a single set of .col-md-* grid classes, you can create a basic grid system that starts out stacked on mobile devices and tablet devices (the extra small to small range) before becoming horizontal on desktop (medium) devices. Place grid columns in any .row.
  10. A basic Bootstrap table has a light padding and only horizontal dividers. The .table class adds basic styling to a table
  11. What is Pager? Pager is also a form of pagination (as described in the previous chapter). Pager provides previous and next buttons (links). To create previous/next buttons, add the .pager class to an <ul> element:
  12. <!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Case</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> </head> <body> <nav class="navbar navbar-default"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="#">WebSiteName</a> </div> <div> <ul class="nav navbar-nav"> <li class="active"><a href="#">Home</a></li> <li><a href="#">Page 1</a></li> <li><a href="#">Page 2</a></li> <li><a href="#">Page 3</a></li> </ul> </div> </div> </nav> <div class="container"> <h3>Basic Navbar Example</h3> <p>A navigation bar is a navigation header that is placed at the top of the page.</p> </div> </body> </html>
  13. <!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <h2>Vertical (basic) form</h2> <form role="form"> <div class="form-group"> <label for="email">Email:</label> <input type="email" class="form-control" id="email" placeholder="Enter email"> </div> <div class="form-group"> <label for="pwd">Password:</label> <input type="password" class="form-control" id="pwd" placeholder="Enter password"> </div> <div class="checkbox"> <label><input type="checkbox"> Remember me</label> </div> <button type="submit" class="btn btn-default">Submit</button> </form> </div> </body> </html>
  14. Includes over 250 glyphs in font format from the Glyphicon Halflings set. Glyphicons Halflings are normally not available for free, but their creator has made them available for Bootstrap free of cost. As a thank you, we only ask that you include a link back to Glyphicons whenever possible.
  15. <!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Case</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <div class="jumbotron"> <h1>My first Bootstrap website!</h1> <p>This page will grow as we add more and more components from Bootstrap...</p> <a href="#" class="btn btn-info btn-lg"><span class="glyphicon glyphicon-search"></span> Search</a> </div> <ul class="nav nav-tabs"> <li class="active"><a href="#">Home</a></li> <li><a href="#">Menu 1</a></li> <li><a href="#">Menu 2</a></li> <li><a href="#">Menu 3</a></li> </ul> <div class="row"> <div class="col-md-3"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> </div> <div class="col-md-3"> <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> </div> <div class="col-md-3"> <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.</p> </div> <div class="col-md-3"> <p>Eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.</p> </div> </div> </div> </body> </html>