SlideShare a Scribd company logo
Building Responsive
Websites with the
Bootstrap 3 Framework
Michael Slater and Charity Grace Kirk

michael@webvanta.com
888.670.6793
1
Today’s Presenters
Michael Slater
‣

President and Cofounder of Webvanta

‣

Has been creating content-rich websites since the
web’s early days

‣

Previously director of technology strategy at Adobe
Systems

Charity Grace Kirk
‣

Senior web developer at Webvanta

‣

More than 5 years experience building sites for clients
on the Webvanta platform

‣

Experience in content strategy, search engine
optimization, and online marketing.

2
Asking Questions
Now
• Ask questions by entering the text
in the GoToWebinar control panel
Later
• Follow up with us afterwards
(sales@webvanta.com) if you have questions
that didn’t get addressed
• Link to slides, video, and code will be emailed
to you tomorrow
3
What is Your Role in
Building Websites?
• Designer
• Developer
• Manager

4
Why Responsive
Design?

5
Adapt to a wide range of
screen sizes

http://www.tempeazdentist.com
6
Desktop-focused sites are
hard to use on phones

7
Google encouraging
responsive design

Searches on mobile phones should link to
mobile-friendly content
8
How much of your browsing
is on a phone or tablet?
• None
• Less than 10%
• 10% to 40%
• About half
• More than half

9
Mobile is Exploding!
Mobile devices (phones and tablets)
‣ Now account for ~20% of all web traffic
‣ Higher for restaurants, hotels

Black Friday mobile traffic
‣ Up 34% from last year, sales up 43%
‣ 21.6% of all online sales from mobile
10
The Mobile Site
Alternative

jQuery Mobile
with Server-side
mobile detection

http://arthistory.berkeley.edu
11
Responsive Design
Basics
• Uses CSS Media Queries
• More than just fluid design
‣ Columns can stack at smaller widths
‣ Sizes, padding, margin … all can adjust
‣ Elements can be hidden or swapped out

12
CSS Media Queries
For Example:
@media (min-width: 440px) and (max-width: 767px) {
h1.logo {
text-align: center;
}
rule will only apply to screens
.subtitle {
440px wide to 767 px wide
display: none;
}
}

13
Media Query
Browser Support
• Chrome, Firefox, Safari, Opera
‣ All reasonably recent versions

• IE10 fully supported
• IE9: except for a few CSS enhancements
• IE8: requires respond.js and html5shiv.js
• IE7: not officially supported, but
“should look and behave well enough”
14
Why Bootstrap?
Speed up development
‣ Responsive grid system
‣ Quality default typography
‣ Common components
‣ Popular jQuery plugins
‣ Simplifies “bootstrapping” your design
15
What is Bootstrap?
• Created by Twitter, published as open
source
• Consists of a CSS file, a JS file, and an icon
font
• CSS is compiled from LESS source
• JS can be loaded in “everything” version or
only selected pieces
‣ Requires jQuery
16
Mobile-First Strategy
Content
• Determine what is most important
Layout
• Design to smaller widths first
• Base CSS addresses phones; media queries for
tablet and desktop
Progressive enhancement
• Add elements as screen size increases
17
Bootstrap
Break Points
/* Extra small devices (“phones”, less than 768px) */
/* No media query need as this is the default Bootstrap */
/* Small devices (“tablets”, 768px and up) */
@media (min-width: 768px) { ... }
/* Medium devices (“desktops”, 992px and up) */
@media (min-width: 992px) { ... }
/* Large devices (“large desktops”, 1200px and up) */
@media (min-width: 1200px) { ... }

18
Responsive Grid
• Standard grid is 12 columns wide
• Fluid by default, then 3 fixed widths
design
width
max
column

fluid

750px

970px

1170px

100%

60px

78px

95px

19
Basic Grid Structure
• <div class=“container”>
‣ <div class=“row”>

• <div class=“col-*-*”></div>
• <div class=“col-*-*”></div>
‣ </div>
‣ <div class=“row”>… </div>

• <div class=“container”>
‣ ...
20
Example 1
understanding .col-md-*

See grid.html

21
Controlling the Grid
• Each breakpoint has its own grid class
‣ .col-xs-*, .col-sm-*, .col-md-*, .col-lg-*

• Below the smallest defined breakpoint
for a column, it stacks vertically

22
Example 2
easy column scaling up and down

See grid2.html
23
Ordering the Grid
• Push and Pull columns to position on
larger widths.
‣ e.g. .col-md-push-* or .col-md-pull-*

24
Example 3
easy column positioning

See grid3.html

25
Responsive Images
• Background Images in CSS
‣ Can load appropriate-size image based on
viewport size (via media queries)

• Images in HTML (<img src="filename.jpg">)
‣ Class .img-responsive sets max-width to
100%
‣ Browser scales images to fit container, but
doesn’t allow them to get pixelated
26
Helper Classes
• Bootstrap includes a variety of CSS
classes to help make markup more
semantic
‣ pull-left, pull-right
‣ center-block, text-right, text-center …
‣ clearfix
‣ visible-xs, hidden-xs, visible-md …
27
Navigation
Vertical Toggle Nav

Horizontal Nav

http://www.wchealth.org
28
JavaScript Features
• Many common JavaScript-based plugins
and functions included
‣ Carousel, transitions
‣ Modal, alert
‣ Dropdown, tab, tooltip, popover, button
‣ Collapse
‣ Scrollspy
29
JavaScript without
JavaScript
• CSS classes and HTML5 data attributes
used to trigger behavior
• Bootstrap JS file finds these attributes
and uses them to active JS and CSS
code

30
JavaScript Plugin
Examples

see widgets.html

31
Visual Components
• Icon library
• Buttons
• Breadcrumbs
• Pagination
• Navbar
• Progress bar
• ... and more
32
Does Bootstrap seem
like a good fit for you?
• No (don’t plan to support mobile)
• No (plan to support mobile differently)
• Probably, I need to learn more
• Yes, I can’t wait!

33
Customizing
• Add your own CSS file after the
Bootstrap file to override and add
classes
• Can edit source LESS files and
recompile into customized CSS
‣ Upgrading to new Bootstrap version can
be difficult

34
Other Responsive
Frameworks
• Foundation (foundation.zurb.com)
• Skeleton (getskeleton.com)

35
Get Started!
getbootstrap.com
www.webvanta.com/trial

36
Webvanta
SmartTheme
• Gives you an instant start
• Fully hosted, all code in place
• Integrate with database-driven content
• The fast way to a powerful, custom
and responsive site
• Join our January webinar
37
What are your
major questions?
• Let us know what more you’d like to
know and we’ll use it to guide our
upcoming articles and webinars

38
We’re Here to Help
• Webvanta specializes in creating content-rich
sites that deliver on business goals
• Get your private consultation
‣ Free 30-minute consultation
‣ email sales@webvanta.com or call 888.670.6793

• Learn more online and stay in touch
‣ www.webvanta.com/blog
‣ www.facebook.com/webvanta
39
241 South Main Street
Sebastopol, CA 95472
sales@webvanta.com
888.670.6793
www.webvanta.comt

40

More Related Content

PDF
Why Drupal 8 Is a Game Changer for Higher Education
PDF
Drupal 8 - A Brief Introduction
PPTX
Multisite Management with eZ Publish
PDF
Drupal at ASU - Drupalcon 2010
PPTX
ONLINE PLATFORMS FOR ICT CONTENT DEVELOPMENT
PDF
Aduivo – the intuitive CMS
PDF
Florida Hospital Case Study with Drupal
PDF
Caching Strategies for Scaling Drupal: Common Missteps vs Best Practices
Why Drupal 8 Is a Game Changer for Higher Education
Drupal 8 - A Brief Introduction
Multisite Management with eZ Publish
Drupal at ASU - Drupalcon 2010
ONLINE PLATFORMS FOR ICT CONTENT DEVELOPMENT
Aduivo – the intuitive CMS
Florida Hospital Case Study with Drupal
Caching Strategies for Scaling Drupal: Common Missteps vs Best Practices

What's hot (11)

PDF
CSS Frameworks for Rapid Site Designs
PDF
Lightning Intro to Serverless, GCP (2017-10-19)
PDF
2014 Android and iOS Design Trends
PDF
Web and Business
PPT
Slideshare again
PDF
Ds05 power bi
PDF
Embracing the modern web using Drupal as a Headless CMS with Gatsby BADCamp
PPT
Slideshare.net
PDF
Big Websites for Small Screens: ICANN.org Case Study
PDF
Drupal Global Training Day by Drupal Mumbai 6th Sep - Drupal Administration
PPTX
Villanueva, realyn p.
CSS Frameworks for Rapid Site Designs
Lightning Intro to Serverless, GCP (2017-10-19)
2014 Android and iOS Design Trends
Web and Business
Slideshare again
Ds05 power bi
Embracing the modern web using Drupal as a Headless CMS with Gatsby BADCamp
Slideshare.net
Big Websites for Small Screens: ICANN.org Case Study
Drupal Global Training Day by Drupal Mumbai 6th Sep - Drupal Administration
Villanueva, realyn p.
Ad

Similar to Building Responsive Websites with the Bootstrap 3 Framework (20)

PDF
FITC - Bootstrap Unleashed
PDF
Node.js 101
PDF
Responsive web design with various grids and frameworks comparison
PPTX
Reboot-Typography.pptx reboot typography to help you in research
PDF
UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
PPTX
SEF 2014 - Responsive Design in SharePoint 2013
PPTX
Training presentation.pptx
PDF
Bootstrap for webtechnology_data science.pdf
PPTX
Twitter bootstrap1
PPTX
221c82d4-5428-4047-8558-0467b34083e8.pptx
PDF
WUD Rome 2014 - Delightful UX – Real-Life Responsive Web Design (EN) - Vitaly...
PDF
Win j svsphonegap-damyan-petev-mihail-mateev
PPTX
Bootstrap for Beginners
PPTX
FITC - 2012-04-23 - Responsive Web Design
PPTX
Presentation on web page development.pptx
PDF
How to make a great website
PPTX
Web Design in 2024 Essential Skills and Emerging Trends.pptx
PDF
Best 5 CSS Frameworks You Should Know To Design Attractive Websites .pdf
DOC
KATHY ZHANG_3
PDF
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
FITC - Bootstrap Unleashed
Node.js 101
Responsive web design with various grids and frameworks comparison
Reboot-Typography.pptx reboot typography to help you in research
UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
SEF 2014 - Responsive Design in SharePoint 2013
Training presentation.pptx
Bootstrap for webtechnology_data science.pdf
Twitter bootstrap1
221c82d4-5428-4047-8558-0467b34083e8.pptx
WUD Rome 2014 - Delightful UX – Real-Life Responsive Web Design (EN) - Vitaly...
Win j svsphonegap-damyan-petev-mihail-mateev
Bootstrap for Beginners
FITC - 2012-04-23 - Responsive Web Design
Presentation on web page development.pptx
How to make a great website
Web Design in 2024 Essential Skills and Emerging Trends.pptx
Best 5 CSS Frameworks You Should Know To Design Attractive Websites .pdf
KATHY ZHANG_3
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
Ad

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
PDF
Electronic commerce courselecture one. Pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Modernizing your data center with Dell and AMD
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
A Presentation on Artificial Intelligence
Electronic commerce courselecture one. Pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Diabetes mellitus diagnosis method based random forest with bat algorithm
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Understanding_Digital_Forensics_Presentation.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation_ Review paper, used for researhc scholars
20250228 LYD VKU AI Blended-Learning.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
MYSQL Presentation for SQL database connectivity
Modernizing your data center with Dell and AMD
“AI and Expert System Decision Support & Business Intelligence Systems”
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Review of recent advances in non-invasive hemoglobin estimation
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...

Building Responsive Websites with the Bootstrap 3 Framework

  • 1. Building Responsive Websites with the Bootstrap 3 Framework Michael Slater and Charity Grace Kirk michael@webvanta.com 888.670.6793 1
  • 2. Today’s Presenters Michael Slater ‣ President and Cofounder of Webvanta ‣ Has been creating content-rich websites since the web’s early days ‣ Previously director of technology strategy at Adobe Systems Charity Grace Kirk ‣ Senior web developer at Webvanta ‣ More than 5 years experience building sites for clients on the Webvanta platform ‣ Experience in content strategy, search engine optimization, and online marketing. 2
  • 3. Asking Questions Now • Ask questions by entering the text in the GoToWebinar control panel Later • Follow up with us afterwards (sales@webvanta.com) if you have questions that didn’t get addressed • Link to slides, video, and code will be emailed to you tomorrow 3
  • 4. What is Your Role in Building Websites? • Designer • Developer • Manager 4
  • 6. Adapt to a wide range of screen sizes http://www.tempeazdentist.com 6
  • 7. Desktop-focused sites are hard to use on phones 7
  • 8. Google encouraging responsive design Searches on mobile phones should link to mobile-friendly content 8
  • 9. How much of your browsing is on a phone or tablet? • None • Less than 10% • 10% to 40% • About half • More than half 9
  • 10. Mobile is Exploding! Mobile devices (phones and tablets) ‣ Now account for ~20% of all web traffic ‣ Higher for restaurants, hotels Black Friday mobile traffic ‣ Up 34% from last year, sales up 43% ‣ 21.6% of all online sales from mobile 10
  • 11. The Mobile Site Alternative jQuery Mobile with Server-side mobile detection http://arthistory.berkeley.edu 11
  • 12. Responsive Design Basics • Uses CSS Media Queries • More than just fluid design ‣ Columns can stack at smaller widths ‣ Sizes, padding, margin … all can adjust ‣ Elements can be hidden or swapped out 12
  • 13. CSS Media Queries For Example: @media (min-width: 440px) and (max-width: 767px) { h1.logo { text-align: center; } rule will only apply to screens .subtitle { 440px wide to 767 px wide display: none; } } 13
  • 14. Media Query Browser Support • Chrome, Firefox, Safari, Opera ‣ All reasonably recent versions • IE10 fully supported • IE9: except for a few CSS enhancements • IE8: requires respond.js and html5shiv.js • IE7: not officially supported, but “should look and behave well enough” 14
  • 15. Why Bootstrap? Speed up development ‣ Responsive grid system ‣ Quality default typography ‣ Common components ‣ Popular jQuery plugins ‣ Simplifies “bootstrapping” your design 15
  • 16. What is Bootstrap? • Created by Twitter, published as open source • Consists of a CSS file, a JS file, and an icon font • CSS is compiled from LESS source • JS can be loaded in “everything” version or only selected pieces ‣ Requires jQuery 16
  • 17. Mobile-First Strategy Content • Determine what is most important Layout • Design to smaller widths first • Base CSS addresses phones; media queries for tablet and desktop Progressive enhancement • Add elements as screen size increases 17
  • 18. Bootstrap Break Points /* Extra small devices (“phones”, less than 768px) */ /* No media query need as this is the default Bootstrap */ /* Small devices (“tablets”, 768px and up) */ @media (min-width: 768px) { ... } /* Medium devices (“desktops”, 992px and up) */ @media (min-width: 992px) { ... } /* Large devices (“large desktops”, 1200px and up) */ @media (min-width: 1200px) { ... } 18
  • 19. Responsive Grid • Standard grid is 12 columns wide • Fluid by default, then 3 fixed widths design width max column fluid 750px 970px 1170px 100% 60px 78px 95px 19
  • 20. Basic Grid Structure • <div class=“container”> ‣ <div class=“row”> • <div class=“col-*-*”></div> • <div class=“col-*-*”></div> ‣ </div> ‣ <div class=“row”>… </div> • <div class=“container”> ‣ ... 20
  • 22. Controlling the Grid • Each breakpoint has its own grid class ‣ .col-xs-*, .col-sm-*, .col-md-*, .col-lg-* • Below the smallest defined breakpoint for a column, it stacks vertically 22
  • 23. Example 2 easy column scaling up and down See grid2.html 23
  • 24. Ordering the Grid • Push and Pull columns to position on larger widths. ‣ e.g. .col-md-push-* or .col-md-pull-* 24
  • 25. Example 3 easy column positioning See grid3.html 25
  • 26. Responsive Images • Background Images in CSS ‣ Can load appropriate-size image based on viewport size (via media queries) • Images in HTML (<img src="filename.jpg">) ‣ Class .img-responsive sets max-width to 100% ‣ Browser scales images to fit container, but doesn’t allow them to get pixelated 26
  • 27. Helper Classes • Bootstrap includes a variety of CSS classes to help make markup more semantic ‣ pull-left, pull-right ‣ center-block, text-right, text-center … ‣ clearfix ‣ visible-xs, hidden-xs, visible-md … 27
  • 28. Navigation Vertical Toggle Nav Horizontal Nav http://www.wchealth.org 28
  • 29. JavaScript Features • Many common JavaScript-based plugins and functions included ‣ Carousel, transitions ‣ Modal, alert ‣ Dropdown, tab, tooltip, popover, button ‣ Collapse ‣ Scrollspy 29
  • 30. JavaScript without JavaScript • CSS classes and HTML5 data attributes used to trigger behavior • Bootstrap JS file finds these attributes and uses them to active JS and CSS code 30
  • 32. Visual Components • Icon library • Buttons • Breadcrumbs • Pagination • Navbar • Progress bar • ... and more 32
  • 33. Does Bootstrap seem like a good fit for you? • No (don’t plan to support mobile) • No (plan to support mobile differently) • Probably, I need to learn more • Yes, I can’t wait! 33
  • 34. Customizing • Add your own CSS file after the Bootstrap file to override and add classes • Can edit source LESS files and recompile into customized CSS ‣ Upgrading to new Bootstrap version can be difficult 34
  • 35. Other Responsive Frameworks • Foundation (foundation.zurb.com) • Skeleton (getskeleton.com) 35
  • 37. Webvanta SmartTheme • Gives you an instant start • Fully hosted, all code in place • Integrate with database-driven content • The fast way to a powerful, custom and responsive site • Join our January webinar 37
  • 38. What are your major questions? • Let us know what more you’d like to know and we’ll use it to guide our upcoming articles and webinars 38
  • 39. We’re Here to Help • Webvanta specializes in creating content-rich sites that deliver on business goals • Get your private consultation ‣ Free 30-minute consultation ‣ email sales@webvanta.com or call 888.670.6793 • Learn more online and stay in touch ‣ www.webvanta.com/blog ‣ www.facebook.com/webvanta 39
  • 40. 241 South Main Street Sebastopol, CA 95472 sales@webvanta.com 888.670.6793 www.webvanta.comt 40