SlideShare a Scribd company logo
Module 3
Bootstrap
Framework
The most popular responsive,
mobile-first HTML5 and CSS3
framework
What is Bootstrap?
• Free front-end framework for faster and easier web development
• Bootstrap includes HTML and CSS for typography, forms, buttons,
tables, navigation, image carousels…
• Optional JavaScript plugins
• Ability to easily create responsive designs
What is responsive web design?
Responsive web design is about creating web sites
which automatically adjust themselves to look good on all devices,
from small phones to large desktops.
What is a framework?
A framework provides code for common activities
performed in web development — so you don’t need to
reinvent the wheel every time you start a project
History of Bootstrap
• Developed by Mark Otto and Jacob
Thornton at Twitter
• Released as an open source product in
August 2011
• Currently on version 3
• Popularity and usage is rising
Goals for Module 3
What we’ll cover in Module 3 (Feb 10 and Feb 17)
This week (Feb 10):
1. Overview of what Bootstrap is and how it can be used
2. Experiment with the grid system
3. Experiment with other elements: tables and buttons
Next week (Feb 17):
1. Create a simple-one page site
Examples
Module 3 - Intro to Bootstrap
Module 3 - Intro to Bootstrap
Pros and Cons of Bootstrap
• Save time: use the predefined
design templates and classes
• Responsive features
• Consistent design across
elements
• Easy to to use
• Compatible with all modern
browsers
• Open Source: free to download
and use
• Div-heavy code
• Relies on classes extensively
• Source code can be rather
complex
• Larger CSS and JS files can
cause some loading lag time
• Popularity means lots of sites
are using it… may want to
customize to stand out
Pros: Cons:
Big pros of Bootstrap? (IMHO)
Start simple, get more complex as needed
Big pros of Bootstrap? (IMHO)
Built-in styles look clean, modern but can easily be customized
Big pros of Bootstrap? (IMHO)
Simple, easy to understand 12-column grid system
Class demos
Download Bootstrap.zip
1. Download:
module-3-bootstrap
(in eLearn - Module 3)
2. Unzip
3. Define a new site using
Dreamweaver, point it to
this folder
Download Bootstrap.zip
4. Open the index.html file
5. Note the links to the css files:
• bootstrap.css - this contains all the styles to create the
layouts (DON’T EDIT THIS FILE)
• bootstrap-theme.css - additional css for a visually
enhanced experience (DON’T EDIT THIS FILE)
• custom-styles.css - this is where you create custom
styles to modify the design
The grid and containers
Container element wraps contents and houses the grid system, options:
.container - responsive fixed-width container
.container-fluid - full-width, spans the entire width of the screen
Step 1: create a container
1. In the index.html file create a <div>
2. Apply the container class:
<div class="container">
</div>
The Grid
The grid creates page layouts with a series of rows and
columns that house the content
Blocks of content are created by specifying the number of
columns you wish to span
Module 3 - Intro to Bootstrap
Media Queries
Key breakpoints in the grid system:
/* Extra small devices (phones, less than 768px) */
/* No media query since this is the default in Bootstrap */
/* Small devices (tablets, 768px and up) */
@media (min-width: @screen-sm-min) { ... }
/* Medium devices (desktops, 992px and up) */
@media (min-width: @screen-md-min) { ... }
/* Large devices (large desktops, 1200px and up) */
@media (min-width: @screen-lg-min) { ... }
Step 2: add a row
1. Inside <div class=“container”>, create a <div>
2. Apply the row class:
<div class=“row">
</div>
Rows and columns
• Rows must be placed within a container for proper
alignment and padding
• Use rows to create horizontal groups of columns
Grid options
• Including the class prefix options allows you to have
more control over how the columns stack/don’t stack on
smaller devices
Step 3: add a column
1. Within the row, create a <div></div>
2. Apply the class for a 12 column-wide column
using extra small:
<div class="col-xs-12">12 columns (x small)</div>
Looks like:
Note: I’ve added some custom styles in <link href="css/custom-styles.css"
rel=“stylesheet"> to show the difference between xs, sm, md and lg
Step 4: add columns at xs
1. Create another row:
<div class=“row">
</div>
2. Create a div and apply the class for 3 column width
using xs (extra-small): col-xs-3
<div class=“col-xs-3”>3 columns (x small)</div>
3. Copy and paste so there are 4 of these <div>s
Looks like:
Step 6: columns at sm
1. Create another row
<div class=“row">
</div>
2. Create a div and apply the class for 3 column width
using sm (small): col-sm-3
<div class=“col-sm-3”>3 columns (small)</div>
3. Copy and paste so there are 4 of these divs
Looks like:
Step 7: columns at md
1. Create another row
<div class=“row">
</div>
2. Create a div and apply the class for 3 column width
using md (medium): col-md-3
<div class=“col-md-3”>3 columns (medium)</div>
3. Copy and paste so there are 4 of these divs
Looks like:
Step 7: columns at lg
1. Create another row
<div class=“row">
</div>
2. Create a div and apply the class for 3 column width
using lg (large): col-lg-3
<div class=“col-lg-3”>3 columns (large)</div>
3. Copy and paste so there are 4 of these divs
Looks like:
Looks like this on a small device:
Notice how the teal and red rows (medium
and large) have stacked at a smaller size…
but the yellow and orange (xsmall and small)
continue to sit side-by-side
Using the class-prefixes allows you to define
how content will look on a smaller device…
Combine for more control…
• Want more control?
• Combine the sizes:
<div class="row">
<div class="col-xs-12 col-md-8”>xs at 12, md at 8</div>
<div class="col-xs-6 col-md-4”>xs at 6, md at 4</div>
</div>
Looks like:
Combining class-prefixes
allows for different layouts on
smaller devices
More great features…
Headings
Styles for headings 1 through 6
Paragraphs
• Bootstrap's global default font-size is 14px, with a line-height of 1.428
• Applied to the <body> and all paragraphs
• <p> tags receive a bottom margin of half their computed line-height
(10px by default)
Making a paragraph stand out
• Make a paragraph stand out by adding the class .lead
Formatting options
Many other classes exist for:
• Inline text elements
• Alignment classes
• Transformation classes
• Abbreviations
• Addresses
• Blockquotes
One of my favourites…
Horizontal definitions:
• Make terms and descriptions in <dl> line up side-by-side
• Starts off stacked like default <dl>s, but when the navbar
expands, so do these
Tables
Open the table.html file
• Add the class “table" to the <table> tag
• Style creates an attractive, easy to read table
Try adding these classes: (e.g. class=“table table-bordered”)
• table-bordered
• table-hover
• table-striped
Responsive table option
Try adding a <div> around the table with the
class"table-responsive"
• Note how the table behaves when viewed on a
small screen
Links and buttons
• Bootstrap has custom button and link styles
<button type="button" class="btn btn-default”>Default</button>
<button type="button" class="btn btn-primary”>Primary</button>
…etc…
Links and buttons
Open the button.html file
• Note the buttons have the class “btn” applied
Try adding these classes:
• btn-default to the button in the left column
• btn-lg to the button in the middle column
• btn-block to the button in the right column
What is the effect of each class?
Putting it all
together…
• Open theme.html
• Check out how some elements work
• E.g. the Carousel at the very bottom
• Shrink your window and see how the
layout changes and adapts
Next week we’ll take some elements
from this theme and build a simple,
one-page website
Interested in learning more?
• Check out the Bootstrap
website at getbootstrap.com

More Related Content

PDF
Developing SEO audits that maximize growth #dmssconference
PDF
Server side rendering with React and Symfony
PDF
CSS Font & Text style
PDF
Introduction to html 5
PDF
PWA SEO: Optimizing for the Future of the Web
PDF
How to Develop Successful SEO Reports #SEOKomm
PPTX
Bootstrap Framework
PDF
CSS Boc model
Developing SEO audits that maximize growth #dmssconference
Server side rendering with React and Symfony
CSS Font & Text style
Introduction to html 5
PWA SEO: Optimizing for the Future of the Web
How to Develop Successful SEO Reports #SEOKomm
Bootstrap Framework
CSS Boc model

What's hot (20)

PPTX
BrightonSEO October 2022 - Dan Taylor SEO - Indexing Ecommerce Websites
PPTX
Google E-E-A-T - Learn It, Live It, Love It.pptx
PPTX
Good/Bad Web Design
PPTX
Python For Technical SEO | Women In Tech SEO Festival March 2020 | Ruth Everett
PPT
Website Evaluation
PPTX
¿Cómo funciona internet y los motores de búsqueda?
PPTX
Hybrid mobile app
PDF
Website Analysis Seo Report
PPT
Software development slides
PDF
Les mythes et légendes du SEO - WebIsland Nantes 2022.pdf
PPTX
Getting Started with Python and Machine Learning for SEO | BrightonSEO Octobe...
PDF
Core Web Vitals Optimization for any website, especially WordPress
PPTX
jQuery Mobile
PDF
Applications secure by default
PPTX
Page layout with css
PPTX
Brighton SEO April 2022 - Automate the technical SEO stuff
PDF
SEO low hanging Fruit - Identifying High Impact Opportunities Fast #SEOforUkr...
PPTX
SEOkomm 2021: Interne Verlinkung
PDF
SEO for E-commerce in 2020 - Top Technical SEO Challenges & How to Fix them #...
PDF
SEO Tool Overload😱... Google Data Studio to the rescue
BrightonSEO October 2022 - Dan Taylor SEO - Indexing Ecommerce Websites
Google E-E-A-T - Learn It, Live It, Love It.pptx
Good/Bad Web Design
Python For Technical SEO | Women In Tech SEO Festival March 2020 | Ruth Everett
Website Evaluation
¿Cómo funciona internet y los motores de búsqueda?
Hybrid mobile app
Website Analysis Seo Report
Software development slides
Les mythes et légendes du SEO - WebIsland Nantes 2022.pdf
Getting Started with Python and Machine Learning for SEO | BrightonSEO Octobe...
Core Web Vitals Optimization for any website, especially WordPress
jQuery Mobile
Applications secure by default
Page layout with css
Brighton SEO April 2022 - Automate the technical SEO stuff
SEO low hanging Fruit - Identifying High Impact Opportunities Fast #SEOforUkr...
SEOkomm 2021: Interne Verlinkung
SEO for E-commerce in 2020 - Top Technical SEO Challenges & How to Fix them #...
SEO Tool Overload😱... Google Data Studio to the rescue
Ad

Similar to Module 3 - Intro to Bootstrap (20)

PPT
Responsive web design
PPT
Introduction to BOOTSTRAP
PPT
Twitter bootstrap training_session_ppt
PDF
Bootstrap day1
PPTX
Bootstrap [part 1]
PDF
Battle of the Front-End Frameworks: Bootstrap vs. Foundation
PPTX
Bootstrap 3
PPTX
Bootstrap 5 ppt
PPTX
Bootstrap SLIDES for web development course
PDF
Bootstrap for webtechnology_data science.pdf
PPTX
Web development and web design with seo
PPTX
Bootstrap
PPTX
Bootstrap PPT by Mukesh
PDF
The Ultimate Guide to Bootstrap for Beginners.pdf
PPTX
Create Responsive Website Design with Bootstrap 3
PDF
Responsive Design and Bootstrap
PDF
ViA Bootstrap 4
PPTX
Intro To Twitter Bootstrap
PPTX
An introduction to bootstrap
PDF
HowTo_CSS
Responsive web design
Introduction to BOOTSTRAP
Twitter bootstrap training_session_ppt
Bootstrap day1
Bootstrap [part 1]
Battle of the Front-End Frameworks: Bootstrap vs. Foundation
Bootstrap 3
Bootstrap 5 ppt
Bootstrap SLIDES for web development course
Bootstrap for webtechnology_data science.pdf
Web development and web design with seo
Bootstrap
Bootstrap PPT by Mukesh
The Ultimate Guide to Bootstrap for Beginners.pdf
Create Responsive Website Design with Bootstrap 3
Responsive Design and Bootstrap
ViA Bootstrap 4
Intro To Twitter Bootstrap
An introduction to bootstrap
HowTo_CSS
Ad

More from Katherine McCurdy-Lapierre, R.G.D. (19)

PPTX
Module 5 - WCM system comparison
PPTX
Module 4 - Dreamweaver Templates (Static vs. Dynamic Content)
PPTX
Week 4 - tablet app design
PPTX
Week 3 Lecture: Accessibility
PPTX
Interactive Web Design 5 - Week 2 - Introduction
PPTX
Week 12 CSS - Review from last week
PPTX
Week 12 CSS Font - size
PPTX
Week 12 CSS Font - family
PPTX
PPTX
Week 4 Lecture Accessibility
PPTX
Week 4 Lecture Part 1
PPTX
Week 4 Lecture Part 2
PPTX
Artistic Web Applications - Week3 - Part 1
PPTX
Artistic Web Applications - Week3 - Part 3
PPTX
Artistic Web Applications - Week3 - Part 2
PPTX
Week2 lecture-whatiswebdesign-part1
PPTX
LecWeek2 lecture-whatiswebdesign-part2
Module 5 - WCM system comparison
Module 4 - Dreamweaver Templates (Static vs. Dynamic Content)
Week 4 - tablet app design
Week 3 Lecture: Accessibility
Interactive Web Design 5 - Week 2 - Introduction
Week 12 CSS - Review from last week
Week 12 CSS Font - size
Week 12 CSS Font - family
Week 4 Lecture Accessibility
Week 4 Lecture Part 1
Week 4 Lecture Part 2
Artistic Web Applications - Week3 - Part 1
Artistic Web Applications - Week3 - Part 3
Artistic Web Applications - Week3 - Part 2
Week2 lecture-whatiswebdesign-part1
LecWeek2 lecture-whatiswebdesign-part2

Recently uploaded (20)

PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
master seminar digital applications in india
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
GDM (1) (1).pptx small presentation for students
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
Institutional Correction lecture only . . .
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
RMMM.pdf make it easy to upload and study
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
master seminar digital applications in india
Module 4: Burden of Disease Tutorial Slides S2 2025
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
GDM (1) (1).pptx small presentation for students
VCE English Exam - Section C Student Revision Booklet
Abdominal Access Techniques with Prof. Dr. R K Mishra
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
01-Introduction-to-Information-Management.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Chinmaya Tiranga quiz Grand Finale.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
O7-L3 Supply Chain Operations - ICLT Program
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Institutional Correction lecture only . . .
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
RMMM.pdf make it easy to upload and study

Module 3 - Intro to Bootstrap

  • 1. Module 3 Bootstrap Framework The most popular responsive, mobile-first HTML5 and CSS3 framework
  • 2. What is Bootstrap? • Free front-end framework for faster and easier web development • Bootstrap includes HTML and CSS for typography, forms, buttons, tables, navigation, image carousels… • Optional JavaScript plugins • Ability to easily create responsive designs
  • 3. What is responsive web design? Responsive web design is about creating web sites which automatically adjust themselves to look good on all devices, from small phones to large desktops.
  • 4. What is a framework? A framework provides code for common activities performed in web development — so you don’t need to reinvent the wheel every time you start a project
  • 5. History of Bootstrap • Developed by Mark Otto and Jacob Thornton at Twitter • Released as an open source product in August 2011 • Currently on version 3 • Popularity and usage is rising
  • 6. Goals for Module 3 What we’ll cover in Module 3 (Feb 10 and Feb 17) This week (Feb 10): 1. Overview of what Bootstrap is and how it can be used 2. Experiment with the grid system 3. Experiment with other elements: tables and buttons Next week (Feb 17): 1. Create a simple-one page site
  • 10. Pros and Cons of Bootstrap • Save time: use the predefined design templates and classes • Responsive features • Consistent design across elements • Easy to to use • Compatible with all modern browsers • Open Source: free to download and use • Div-heavy code • Relies on classes extensively • Source code can be rather complex • Larger CSS and JS files can cause some loading lag time • Popularity means lots of sites are using it… may want to customize to stand out Pros: Cons:
  • 11. Big pros of Bootstrap? (IMHO) Start simple, get more complex as needed
  • 12. Big pros of Bootstrap? (IMHO) Built-in styles look clean, modern but can easily be customized
  • 13. Big pros of Bootstrap? (IMHO) Simple, easy to understand 12-column grid system
  • 15. Download Bootstrap.zip 1. Download: module-3-bootstrap (in eLearn - Module 3) 2. Unzip 3. Define a new site using Dreamweaver, point it to this folder
  • 16. Download Bootstrap.zip 4. Open the index.html file 5. Note the links to the css files: • bootstrap.css - this contains all the styles to create the layouts (DON’T EDIT THIS FILE) • bootstrap-theme.css - additional css for a visually enhanced experience (DON’T EDIT THIS FILE) • custom-styles.css - this is where you create custom styles to modify the design
  • 17. The grid and containers Container element wraps contents and houses the grid system, options: .container - responsive fixed-width container .container-fluid - full-width, spans the entire width of the screen
  • 18. Step 1: create a container 1. In the index.html file create a <div> 2. Apply the container class: <div class="container"> </div>
  • 19. The Grid The grid creates page layouts with a series of rows and columns that house the content Blocks of content are created by specifying the number of columns you wish to span
  • 21. Media Queries Key breakpoints in the grid system: /* Extra small devices (phones, less than 768px) */ /* No media query since this is the default in Bootstrap */ /* Small devices (tablets, 768px and up) */ @media (min-width: @screen-sm-min) { ... } /* Medium devices (desktops, 992px and up) */ @media (min-width: @screen-md-min) { ... } /* Large devices (large desktops, 1200px and up) */ @media (min-width: @screen-lg-min) { ... }
  • 22. Step 2: add a row 1. Inside <div class=“container”>, create a <div> 2. Apply the row class: <div class=“row"> </div>
  • 23. Rows and columns • Rows must be placed within a container for proper alignment and padding • Use rows to create horizontal groups of columns
  • 24. Grid options • Including the class prefix options allows you to have more control over how the columns stack/don’t stack on smaller devices
  • 25. Step 3: add a column 1. Within the row, create a <div></div> 2. Apply the class for a 12 column-wide column using extra small: <div class="col-xs-12">12 columns (x small)</div>
  • 26. Looks like: Note: I’ve added some custom styles in <link href="css/custom-styles.css" rel=“stylesheet"> to show the difference between xs, sm, md and lg
  • 27. Step 4: add columns at xs 1. Create another row: <div class=“row"> </div> 2. Create a div and apply the class for 3 column width using xs (extra-small): col-xs-3 <div class=“col-xs-3”>3 columns (x small)</div> 3. Copy and paste so there are 4 of these <div>s
  • 29. Step 6: columns at sm 1. Create another row <div class=“row"> </div> 2. Create a div and apply the class for 3 column width using sm (small): col-sm-3 <div class=“col-sm-3”>3 columns (small)</div> 3. Copy and paste so there are 4 of these divs
  • 31. Step 7: columns at md 1. Create another row <div class=“row"> </div> 2. Create a div and apply the class for 3 column width using md (medium): col-md-3 <div class=“col-md-3”>3 columns (medium)</div> 3. Copy and paste so there are 4 of these divs
  • 33. Step 7: columns at lg 1. Create another row <div class=“row"> </div> 2. Create a div and apply the class for 3 column width using lg (large): col-lg-3 <div class=“col-lg-3”>3 columns (large)</div> 3. Copy and paste so there are 4 of these divs
  • 35. Looks like this on a small device: Notice how the teal and red rows (medium and large) have stacked at a smaller size… but the yellow and orange (xsmall and small) continue to sit side-by-side Using the class-prefixes allows you to define how content will look on a smaller device…
  • 36. Combine for more control… • Want more control? • Combine the sizes: <div class="row"> <div class="col-xs-12 col-md-8”>xs at 12, md at 8</div> <div class="col-xs-6 col-md-4”>xs at 6, md at 4</div> </div>
  • 37. Looks like: Combining class-prefixes allows for different layouts on smaller devices
  • 40. Paragraphs • Bootstrap's global default font-size is 14px, with a line-height of 1.428 • Applied to the <body> and all paragraphs • <p> tags receive a bottom margin of half their computed line-height (10px by default)
  • 41. Making a paragraph stand out • Make a paragraph stand out by adding the class .lead
  • 42. Formatting options Many other classes exist for: • Inline text elements • Alignment classes • Transformation classes • Abbreviations • Addresses • Blockquotes
  • 43. One of my favourites… Horizontal definitions: • Make terms and descriptions in <dl> line up side-by-side • Starts off stacked like default <dl>s, but when the navbar expands, so do these
  • 44. Tables Open the table.html file • Add the class “table" to the <table> tag • Style creates an attractive, easy to read table Try adding these classes: (e.g. class=“table table-bordered”) • table-bordered • table-hover • table-striped
  • 45. Responsive table option Try adding a <div> around the table with the class"table-responsive" • Note how the table behaves when viewed on a small screen
  • 46. Links and buttons • Bootstrap has custom button and link styles <button type="button" class="btn btn-default”>Default</button> <button type="button" class="btn btn-primary”>Primary</button> …etc…
  • 47. Links and buttons Open the button.html file • Note the buttons have the class “btn” applied Try adding these classes: • btn-default to the button in the left column • btn-lg to the button in the middle column • btn-block to the button in the right column What is the effect of each class?
  • 48. Putting it all together… • Open theme.html • Check out how some elements work • E.g. the Carousel at the very bottom • Shrink your window and see how the layout changes and adapts Next week we’ll take some elements from this theme and build a simple, one-page website
  • 49. Interested in learning more? • Check out the Bootstrap website at getbootstrap.com