Responsive Web Design and Bootstrap MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

Similar documents
Programming web design MICHAEL BERNSTEIN CS 247

Front-End UI: Bootstrap

Responsive Web Design (RWD)

TODAY S AGENDA. An introduction for Libraries UW-SLIS CES Webinar April 6, 2015 What is Responsive Web Design? Definition & History

Bootstrap can make a mediocre page look great almost without any effort. The Bootstrap CSS automatically applies to common HTML elements.

Introduction to Computer Science Web Development

Responsive Design. Responsive Design Approach. Technique for building webpages

Getting started with jquery MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

International Conference KNOWLEDGE-BASED ORGANIZATION Vol. XXIII No RESPONSIVE WEB DESIGN TECHNIQUES. Luminita GIURGIU, Ilie GLIGOREA

Purpose of this doc. Most minimal. Start building your own portfolio page!

How to deploy for multiple screens

Session 5. Web Page Generation. Reading & Reference

Web Programming BootStrap Unit Exercises

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) More on Relative Linking. Learning Objectives (2 of 2)

Chapter 7 BMIS335 Web Design & Development

HTML and CSS MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

CSS3: Using media queries to improve the web site experience. November 19, 2011 indieconf Zoe Mickley

AGENDA. EMBEDDING FONTS [ Font Files & CSS font-family ] :: Online Font Converter :: ADD font-family css code to style.css

Responsive Design for Web Applications R.I.T. S. Ludi/R. Kuehl p. 1 R I T. Software Engineering

WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5

This project will use an API from to retrieve a list of movie posters to display on screen.

CSC309 Programming on the Web week 3: css, rwd

Create First Web Page With Bootstrap

Want to read more? You can buy this book at oreilly.com in print and ebook format. Buy 2 books, get the 3rd FREE!

Responsive Web Design. Sheri German, Instructor Montgomery College

Class 9 / Instructor: Ira Epstein

Responsive Web Design. From: Ethan Marcotte - Responsive Web Design 2011

Responsive web design (RWD) CSS3 Media queries. Mobile vs desktop web sites. Web Development 1 CS1115/CS5002

Designing for diverse devices. Dr. Andres Baravalle

Mateen Eslamy 10/31/13

HTML MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

Working Bootstrap Contact form with PHP and AJAX

EXPLORE MODERN RESPONSIVE WEB DESIGN TECHNIQUES

AP CS P. Unit 2. Introduction to HTML and CSS

Building Web Applications

A pixel is not a pixel. Peter-Paul Koch SF HTML5, 6 April 2012

AGENDA. :: Add Meta Tag for Viewport (inside of head element): :: Add Script that renders HTML5 elements for older versions of Internet Explorer

A pixel is not a pixel. Peter-Paul Koch MoBeers, 10 April 2012

Building Responsive Layouts

The Structure of the Web. Jim and Matthew

AGENDA :: MULTIMEDIA TOOLS :: CLASS NOTES. INSTALLING FONTS :: Download, Install, & Embed Your Fonts. LECTURE :: Responsive Web Design [RWD]

Responsive Design. Responsive design is it important? But typical is not enough. Some typical screen sizes

JavaScript and the DOM MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

jquery & Responsive Web Design w/ Dave #jqsummit #rwd

CSS3, Media Queries, & Responsive Design. May 23, 2012 STC Summit Zoe Mickley

Introduce Bootstrap 3 to develop RESPONSIVE. design application. Copyright 2014 exo Platform

Web Site Design Small Screen Design Responsive Design R.I.T. S. Ludi/R. Kuehl p. 1 R I T. Software Engineering

Development Training. For Developer. 4 th May, AOT Intranet Web Portal

Mastering the APEX Universal Theme

Form Validation (with jquery, HTML5, and CSS) MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

Introduction to WEB PROGRAMMING

COMP519 Web Programming Lecture 8: Cascading Style Sheets: Part 4 Handouts

BOOTSTRAP GRID SYSTEM

WEB/DEVICE DEVELOPMENT CLIENT SIDE MIS/CIT 310

Here are some links to get you started in learning more about CSS3 media queries and responsive web design:

HTML Organizing Page Content

CISC 1600 Lecture 1.4 Design, part 2. Topics: Accessibility Responsive web design Example design review

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

A pixel is not a pixel. Peter-Paul Koch BlackBerry Jam, 6 February 2012

Navigation. Websites need a formalized system of links to allow users to navigate the site

Table Basics. The structure of an table

Web Design and Implementation

Comm 244 Week 3. Navigation. Navigation. Websites need a formalized system of links to allow users to navigate the site

Before you begin, make sure you have the images for these exercises saved in the location where you intend to create the Nuklear Family Website.

Create a three column layout using CSS, divs and floating

<link rel="stylesheet" href="

Designing the Home Page and Creating Additional Pages

Design Document V2 ThingLink Startup

Web Development and HTML. Shan-Hung Wu CS, NTHU

c122sep2214.notebook September 22, 2014

Adaptations by PVII responsive and then creates your page instantly Al Sparber & Gerry Jacobsen PVII

Using Dreamweaver CS6

CIT BY: HEIDI SPACKMAN

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

Viewports. Peter-Paul Koch CSS Day, 4 June 2014

All India Council For Research & Training

Designing Responsive Web Mobile Mapping Applications. Andy

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development

Week 8 Google Maps. This week you ll learn how to embed a Google Map into a web page and add custom markers with custom labels.

FRONT END DEVELOPER CAREER BLUEPRINT

web-sockets-homework Directions

2017 Progress. All Rights Reserved. The Anatomy Of Responsive ASP.NET Apps WHITEPAPER

Markup Language. Made up of elements Elements create a document tree

Designing with CSS3 Effectively & Efficiently. October 2010 Adobe MAX Zoe Mickley

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo

JSN PageBuilder 2 User Manual

Mobile Applications 2013/2014

Tutorial 4. Activities. Code o Editor: Expression Web o Focus : Base Layout, navigation with folders, external stylesheets, Open up Expression Web

Microsoft Expression Web Quickstart Guide

Viewports. Peter-Paul Koch DevReach, 13 November 2017

CSS: Responsive Design, CSS3 and Fallbacks

,.., «..»

Bootstrap 1/20

Standard Design Reference

BA. (Hons) Graphics Design

AGENDA :: MULTIMEDIA TOOLS :: CLASS NOTES

Advanced Dreamweaver CS6

Transcription:

Responsive Web Design and Bootstrap MIS 2402 Konstantin Bauman Department of MIS Fox School of Business Temple University

Exam 3 (FINAL) Date: 12/06/18 four weeks from now! JavaScript, jquery, Bootstrap, APIs 1 hour 20 minutes Use class workstations You can use Google Preparations: Read Book, do exercises and challenges https://www.w3schools.com/jquery/

Responsive Web Design What is RWD? The idea of responsive web design has been called many things: flexible, fluid, elastic, etc. Bottom line: a responsive web site (or web interface) is an interface that adapts to browser dimensions Responsive Web Design is important because we live in a world full of different devices. Slide 3

Where this topic fits HTML HTML and CSS are the basic tools used to implement a Responsive Web Design. JavaScript CSS Today s material compliments JavaScript, but does not require JavaScript Slide 4

RWD defined Ethan Marcotte is a web designer, author, and public speaker. See http://ethanmarcotte.com He described the theory and practice of responsive web design in his brief 2011 book titled Responsive Web Design. Ethan Marcotte, defines RWD as these three things: 1. A Flexible Grid Layout 2. Flexible Images 3. Media Queries Also in 2011, something called Bootstrap was released by a development team at Twitter. 1. Bootstrap is a CSS framework. (A framework is a collection of existing technologies, bundled together in a new, novel, and consistent way.) 2. Bootstrap is a convenient way to get a flexible grid layout. 3. Bootstrap is free to use, Open Source, and remains popular today. Slide 5

Bootstrap s flexible grid layout Bootstrap layout is oriented around the notion of spans. Conceptually, a typical Bootstrap layout slices a monitor into 12 columns called spans. Twelve might seem like an awkward number to choose, but it made sense back in 2011. Web designers were attempting to accommodate 1024x768 monitors. 768 px 1024 px 960 pixels wide (or twelve 80px columns) Designers found it convenient to assume a 960 pixel width screen. 960 pixels is close to 1024 and conveniently divisible by 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, and 16 Look at index01.html and index02.html to see the benefit of a flexible grid. Slide 6

How to get bootstrap The viewport meta tag is important! See: https://www.w3schools.com/css/css_rwd_viewport.asp <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script> </head> Pro tip! Knowing what a CDN URL is, and how to add one to your solution, is a powerful way to extend the options available to you, the programmer. So, just like we got the jquery library from a Content Delivery Network (CDN) reference, we get the bootstrap framework from yet another CDN. Slide 7

Next step Once you have linked to a bootstrap.min.css file, you get a whole bunch of classes set up for you, for free! 1. The container class is essential. Everything needs to be inside of it! 2. The row class is almost as important. Use it to specify groupings of columns. 3. Finally, there are a number of classes named with the pattern col-gridclass-number. <div class="col-md-10">some Content here.</div> Grid Class Slide 8

Grid Classes To specify a particular column s width, we specify both the grid class, and the span of the column. The Bootstrap 4 grid system has five classes: - Extra small - for phones / viewport width less than 576px -sm- -md- -lg- -xl- Small - for tablets / viewport width of 576px or greater Medium - for typical laptops / width of 768px or greater Large - for larger desktops / width of 992px or greater extra Large - width of 1200px or greater FYI: Bootstrap 3 s grid classes are slightly different, but sm, md and lg are found there too! Tip: Each class scales up! So a best practice is to design around the smallest anticipated viewport size. Slide 9

Spans should add up to 12 After you specify the grid class, indicate the width of the column in spans. <div class="col-md-10">some Content here.</div> Width in spans In bootstrap, the column 12 spans equate to the full width of the viewport. The bootstrap grid system is responsive, and the columns will rearrange automatically depending on the screen size. A best practice is to make sure that the column widths add up to 12 spans. (There are occasional exceptions to that best practice.) Slide 10

Some sample code for a 3 column layout <div class="container"> <div class="row"> <div class="col-md-4">a</div> <div class="col-md-4">b</div> <div class="col-md-4">c</div> </div> </div> A B C Slide 11

Another example 6 spans 6 spans ROW #1 CONTAINER ROW #2 2 spans 5 spans 3 spans 2 spans Slide 12

Contextual Classes Bootstrap also gives us contextual classes. For example, there are CSS classes for background colors:.bg-primary,.bg-success, bg-info, bg-warning, and.bg-danger <p class="bg-primary">this text is important.</p> <p class="bg-success">this text indicates success.</p> <p class="bg-info">this text represents some information.</p> <p class="bg-warning">this text represents a warning.</p> The class names are contextual because they convey the meaning of the style, not it s appearance. <p class="bg-danger">this text represents danger.</p> Slide 13

Contextual Classes - buttons See index03.html Slide 14

So far According to Ethan Marcotte, RWD is three things, working together: 1. A Flexible Grid Layout 2. Flexible Images 3. Media Queries Bootstrap gives us this (the hardest thing to implement). It also gives us contextual classes. Bootstrap doesn t give us these. So, we need to provide our own CSS. Slide 15

Where to put our CSS? <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script> <!-- a link to my custom CSS //--> <link rel="stylesheet" href= app.css"> </head> We can add our own rules here, after we have had the benefit of all the bootstrap class definitions. Slide 16

Flexible Images Flexible Images are necessary to scale images fluidly. The CSS attribute that allows us to do this is: max-width: 100%; That is, if we apply that style to an image, then it will expand (or shrink) to the size of its containing element. Note: It s important to have a containing element! There are a number of extra steps that are necessary to implement this effect in legacy browsers like IE9. Assuming that you are using a browser released in the last few years you don t need to worry about that! See index04.html Slide 17

Media Queries Media queries allow us to override previously declared style sheet attributes using an @media rule. The @media rules allow us to customize styles based on the size of the current viewport. The @media rules allow us to deal with exceptions that can t be gracefully addressed by out flexible grid. Slide 18

Media Queries (2) For example: @media (max-width: 576px) { img { display: none; } } Another example: @media (max-width: 576px) { #header{ } } min-height: 20px; This says when the viewport is narrow, don t display any of the images. This says when the viewport is narrow, style the tag with the id of header See index_5.html Slide 19

Ok now you try Slide 20