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

PPT
Introduction to BOOTSTRAP
Jeanie Arnoco
 
PPTX
An introduction to bootstrap
Mind IT Systems
 
PPTX
Bootstrap 5 ppt
Mallikarjuna G D
 
PPTX
Page layout with css
Er. Nawaraj Bhandari
 
PPT
Diabetes prediction using machine learning
dataalcott
 
PDF
Bootstrap 5 basic
Jubair Ahmed Junjun
 
PPTX
Bootstrap ppt
Nidhi mishra
 
PDF
Visualising Multi Dimensional Data
Amit Kapoor
 
Introduction to BOOTSTRAP
Jeanie Arnoco
 
An introduction to bootstrap
Mind IT Systems
 
Bootstrap 5 ppt
Mallikarjuna G D
 
Page layout with css
Er. Nawaraj Bhandari
 
Diabetes prediction using machine learning
dataalcott
 
Bootstrap 5 basic
Jubair Ahmed Junjun
 
Bootstrap ppt
Nidhi mishra
 
Visualising Multi Dimensional Data
Amit Kapoor
 

What's hot (20)

PDF
Basic html
Nicha Jutasirivongse
 
PDF
7.-Bootstrap-5-report powerpoint presentation
JohnLagman3
 
PDF
Responsive web design
Russ Weakley
 
PPTX
Bootstrap 3
McSoftsis
 
PPT
Introduction to Web Programming - first course
Vlad Posea
 
PPTX
Bootstrap
AvinashChunduri2
 
PPTX
Introduction to Web Technology
Aashish Jain
 
PPTX
HTML5 & CSS3
Ian Lintner
 
PPTX
Web mining
TeklayBirhane
 
PPTX
Foundation Front-End Framework Overview
valuebound
 
PDF
Chapter 1 Introduction to Information Storage and Retrieval.pdf
Habtamu100
 
PDF
Introduction to Bootstrap
Ron Reiter
 
PPTX
3 - Finding similar items
Viet-Trung TRAN
 
PDF
CSS3, Media Queries, and Responsive Design
Zoe Gillenwater
 
PPTX
Html Frames
Xainab Ishfaq
 
PDF
Bootstrap
Jadson Santos
 
PDF
Build a Website Using HTML + CSS
Anna Cook (she/her)
 
PDF
Hadoop architecture-tutorial
vinayiqbusiness
 
PPTX
Introduction to SASS
Jon Dean
 
PPTX
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
Simplilearn
 
7.-Bootstrap-5-report powerpoint presentation
JohnLagman3
 
Responsive web design
Russ Weakley
 
Bootstrap 3
McSoftsis
 
Introduction to Web Programming - first course
Vlad Posea
 
Bootstrap
AvinashChunduri2
 
Introduction to Web Technology
Aashish Jain
 
HTML5 & CSS3
Ian Lintner
 
Web mining
TeklayBirhane
 
Foundation Front-End Framework Overview
valuebound
 
Chapter 1 Introduction to Information Storage and Retrieval.pdf
Habtamu100
 
Introduction to Bootstrap
Ron Reiter
 
3 - Finding similar items
Viet-Trung TRAN
 
CSS3, Media Queries, and Responsive Design
Zoe Gillenwater
 
Html Frames
Xainab Ishfaq
 
Bootstrap
Jadson Santos
 
Build a Website Using HTML + CSS
Anna Cook (she/her)
 
Hadoop architecture-tutorial
vinayiqbusiness
 
Introduction to SASS
Jon Dean
 
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
Simplilearn
 
Ad

Similar to Module 3 - Intro to Bootstrap (20)

PPT
Responsive web design
AirticsTrainer
 
PPT
Twitter bootstrap training_session_ppt
Radheshyam Kori
 
PDF
Bootstrap day1
Rafi Haidari
 
PPTX
Bootstrap [part 1]
Ghanshyam Patel
 
PDF
Battle of the Front-End Frameworks: Bootstrap vs. Foundation
Rachel Cherry
 
PPTX
Bootstrap SLIDES for web development course
dreamy678
 
PDF
Bootstrap for webtechnology_data science.pdf
Harish Khodke
 
PPTX
Web development and web design with seo
Rajat Anand
 
PPTX
Bootstrap
PumoTechnovation
 
PPTX
Bootstrap PPT by Mukesh
Mukesh Kumar
 
PDF
The Ultimate Guide to Bootstrap for Beginners.pdf
webcooks Digital Academy
 
PPTX
Create Responsive Website Design with Bootstrap 3
Wahyu Putra
 
PDF
Responsive Design and Bootstrap
MahmoudOHassouna
 
PDF
ViA Bootstrap 4
imdurgesh
 
PPTX
Intro To Twitter Bootstrap
Ahmed Haque
 
PDF
HowTo_CSS
tutorialsruby
 
PDF
HowTo_CSS
tutorialsruby
 
PPTX
Bootstrap - Basics
FirosK2
 
PPTX
MS Access 2. pptx
arwam539
 
PPTX
ICT Presentjrjdjdjdkkdkeeation Final.pptx
naziakhan111v
 
Responsive web design
AirticsTrainer
 
Twitter bootstrap training_session_ppt
Radheshyam Kori
 
Bootstrap day1
Rafi Haidari
 
Bootstrap [part 1]
Ghanshyam Patel
 
Battle of the Front-End Frameworks: Bootstrap vs. Foundation
Rachel Cherry
 
Bootstrap SLIDES for web development course
dreamy678
 
Bootstrap for webtechnology_data science.pdf
Harish Khodke
 
Web development and web design with seo
Rajat Anand
 
Bootstrap
PumoTechnovation
 
Bootstrap PPT by Mukesh
Mukesh Kumar
 
The Ultimate Guide to Bootstrap for Beginners.pdf
webcooks Digital Academy
 
Create Responsive Website Design with Bootstrap 3
Wahyu Putra
 
Responsive Design and Bootstrap
MahmoudOHassouna
 
ViA Bootstrap 4
imdurgesh
 
Intro To Twitter Bootstrap
Ahmed Haque
 
HowTo_CSS
tutorialsruby
 
HowTo_CSS
tutorialsruby
 
Bootstrap - Basics
FirosK2
 
MS Access 2. pptx
arwam539
 
ICT Presentjrjdjdjdkkdkeeation Final.pptx
naziakhan111v
 
Ad

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

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

Recently uploaded (20)

PDF
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
PDF
Landforms and landscapes data surprise preview
jpinnuck
 
PPTX
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
PDF
Arihant Class 10 All in One Maths full pdf
sajal kumar
 
PPTX
ACUTE NASOPHARYNGITIS. pptx
AneetaSharma15
 
PPTX
Open Quiz Monsoon Mind Game Final Set.pptx
Sourav Kr Podder
 
PPTX
Care of patients with elImination deviation.pptx
AneetaSharma15
 
PDF
Electricity-Magnetic-and-Heating-Effects 4th Chapter/8th-science-curiosity.pd...
Sandeep Swamy
 
PPTX
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
PPT
Python Programming Unit II Control Statements.ppt
CUO VEERANAN VEERANAN
 
PPTX
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
PDF
Types of Literary Text: Poetry and Prose
kaelandreabibit
 
PPTX
Introduction and Scope of Bichemistry.pptx
shantiyogi
 
PDF
3.The-Rise-of-the-Marathas.pdfppt/pdf/8th class social science Exploring Soci...
Sandeep Swamy
 
PPTX
IMMUNIZATION PROGRAMME pptx
AneetaSharma15
 
PPTX
NOI Hackathon - Summer Edition - GreenThumber.pptx
MartinaBurlando1
 
PDF
The Picture of Dorian Gray summary and depiction
opaliyahemel
 
PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
PDF
High Ground Student Revision Booklet Preview
jpinnuck
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
Landforms and landscapes data surprise preview
jpinnuck
 
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
Arihant Class 10 All in One Maths full pdf
sajal kumar
 
ACUTE NASOPHARYNGITIS. pptx
AneetaSharma15
 
Open Quiz Monsoon Mind Game Final Set.pptx
Sourav Kr Podder
 
Care of patients with elImination deviation.pptx
AneetaSharma15
 
Electricity-Magnetic-and-Heating-Effects 4th Chapter/8th-science-curiosity.pd...
Sandeep Swamy
 
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
Python Programming Unit II Control Statements.ppt
CUO VEERANAN VEERANAN
 
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
Types of Literary Text: Poetry and Prose
kaelandreabibit
 
Introduction and Scope of Bichemistry.pptx
shantiyogi
 
3.The-Rise-of-the-Marathas.pdfppt/pdf/8th class social science Exploring Soci...
Sandeep Swamy
 
IMMUNIZATION PROGRAMME pptx
AneetaSharma15
 
NOI Hackathon - Summer Edition - GreenThumber.pptx
MartinaBurlando1
 
The Picture of Dorian Gray summary and depiction
opaliyahemel
 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
High Ground Student Revision Booklet Preview
jpinnuck
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 

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