Twitter Bootstrap Grid System

Slides:



Advertisements
Similar presentations
Twitter Bootstrap. Agenda What is it? Grids and Fluid layouts Globals and Typography Tables, Forms and Buttons Navigation Media and thumbnails Responsive.
Advertisements

Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
Bootstrap & CSS James Kahng. Intro Websites require a lot of upfront setup to look passably good (HTML base, CSS style, etc.) Because of this, people.
HTML. Creating a Table Attributes: border: indicates the border type of the table Value: 0 (no border), 1, 2, etc. cols: indicates the number of columns.
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
>> Introduction to HTML: Tables. HTML is used to give websites structure 5 Basic Tags Element = Start-Tag+Content+End-Tag Heading Tags [h1-h6] Paragraph.
CHAPTER 1 HTML & HTML5 I อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
Introduction to Bootstrap
Bootstrap by:- Vignesh Dhamodaran. What is Bootstrap? Originally created by a designer and a developer at Twitter. So initial name is Twitter Bootstrap.
Bootstrap Front-End Framework for Responsive Web Sites Svetlin Nakov Technical Trainer Software University
Positioning Objects with CSS and Tables
 An HTML, CSS, Javascript framework you can use as a basis for creating web sites  Uses CSS settings, fundamental HTML elements styled and enhanced.
A gentle introduction to Bootstrap MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/18/
Fundamentals of Web DevelopmentRandy Connolly and Ricardo Hoar Textbook to be published by Pearson Ed in early Bootstrap.
Chapter 4 Bootstrap. Content Bootstrap with CSS Bootstrap Layout Components Bootstrap Plugins.
A gentle introduction to Bootstrap TDAP Jeremy Shafer Department of MIS Fox School of Business Temple University Spring
CSS.
Front-end framework 1.
HTML HTML5 InfoTech Seminar.
Bootstrap L. Grewe.
HTML & CSS Jan Janoušek.
Bootstrap KS Technologies.
CSCI 1720 W3.CSS – Part 1 East Tennessee State University Department of Computing CSCI 1720 Intermediate Web Design.
CNIT131 Internet Basics & Beginning HTML
Cookies, Sessions, Bootstrap
Bootstrap 3 SoftUni Team Technical Trainers Software University
PHP MySQL Crash Course with HTML CSS
Semester - Review.
CSS Layouts: Grouping Elements
Unit 3 - Review.
A gentle introduction to Bootstrap
CSS Bootstrap.
What’s New In Bootstrap v4?
Website implementation
Creating customization with JS framework: Bootstrap
Front-End Framework for Responsive Web Sites
Introduction to Bootstrap Bootstrap සදහා හැදින්වීම
Cascading Style Sheets (Layout)
Web Programming– UFCFB Bootstrap Lecture 12
DHTML tidbits.
User Interface Design and Usability Bootstrap
Bootstrap A popular HTLM, CSS, and JS framework for developing responsive, mobile first projects on the web.
CS3220 Web and Internet Programming Introduction to Bootstrap
IS1500: Introduction to Web Development
>> CSS Layouts.
7 More on Links, Layout & Mobile.
Bootstrap響應式網頁設計 (Responsive Web Design, RWD)
Revision.
Bootstrap Topics What is bootstrap? Documentation
Objectives Create a reset style sheet Explore page layout designs
Popups, Dialogs, Widgets, Panels
DHTML tidbits.
A gentle introduction to Bootstrap
Website implementation - continued
Responsive Web Design and Bootstrap
DHTML tidbits.
Responsive Grid Layout with Bootstrap
Chapter 2 Bootstrap Grid System
CSS and Bootstrap MIS 2402 Jeremy Shafer Department of MIS
CSS and Bootstrap MIS 3502 Jeremy Shafer Department of MIS
Responsive Web Design and Bootstrap
CS3220 Web and Internet Programming Introduction to Bootstrap
Web Page Layout Imran Rashid CTO at ManiWeber Technologies.
Exploring Bootstrap Components
Bootstrap 4 December 17, 2018.
Web Client Side Technologies Raneem Qaddoura
Web Client Side Technologies Raneem Qaddoura
Bootstrap/WebFlow Web development of the future
Presentation transcript:

Twitter Bootstrap Grid System http://china2017.zift.ca/ Twitter Bootstrap Grid System Medhat Elmasry

Bootstrap 3.3.x Mobile 1st framework for building responsive websites Download from http://getbootstrap.com/ Copy css, fonts, and js folders into your web directory Bootstrap's JavaScript requires jQuery version 1.9.1 or higher.

css folder files bootstrap.css bootstrap.min.css bootstrap-theme.css bootstrap-theme.min.css

font folder files use of font files instead of flat images to showcase various image icons. This has a couple of advantages: Consumes less bandwidth, speeds up the website The font icons are responsive and resizable Font icons are called Glyphicons

js folder files bootstrap.js bootstrap.min.js These files contains bootstrap’s main JavaScript libraries for things like: carousels drop down menus search auto suggest +…. many other powerful JavaScript functionalities

http://www.asp.net/ajax/cdn Bootstrap CDN CDN == Content Delivery Network <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <!-- Optional theme --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"> <!-- Latest compiled and minified JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> http://www.asp.net/ajax/cdn

Twitter Bootstrap grid system.

Grid Sizes Category Code Width For Extra Small xs <768px Phones Small Devices Medium md >=992px Desktops Large lg >=1200px Large Desktops

Three equal columns The following example shows how to get three equal-width columns starting at tablets <div class="row"> <div class="col-sm-4">.col-sm-4</div> </div> .col-sm-4

Bootstrap Grid System Bootstrap's grid system allows up to 12 columns across the page. If you do not want to use all 12 column individually, you can group the columns together to create wider columns: span 1 span 4  span 4 span 8 span 6 span 12

Start with this . . . . . . <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Bootstrap 3.0 Grid System</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="css/bootstrap.min.css" rel="stylesheet" media="screen"> <style> .col-xs-12 { height: 100px; background-color: blue; color: white; text-align: center; border: 2px solid black; } </style> </head> <body> <div class="container"> <div class="row"> </div> </body> </html>

Grid classes .container or container-fluid .row .col-##-## wrapper for all your rows Also centers row and prevents it from being full screen. .row contains all your column classes .col-##-## the sizes of the columns in your row (xs, sm, md, lg) See: 1 to 9 **** .html

Ordering classes Only for md and lg screens .col-##-push-## Pushes your columns .com-##-pull-## Pulls your columns See: 10-push-pull.html

Offset classes Only for md and lg screens .col-##-offset-## Moves your columns depending on what column is offset by See: 11-offset.html

Responsive Utilities .visible-xs .hidden-xs .visible-sm .hidden-sm .visible-md .hidden-md .visible-lg .hidden-lg

Responsive utility classes Hide and show content on your screen depending on which your device style is for. .visible-## Your contents will only be visible on that screen size .hidden-## Your contents will only be hidden on that screen size See: 12-visible.html & 13-hidden.html

Styling tables See: 14-table.html <table class="table table-condensed table-striped table-hover"> <caption>Months of the year</caption> <thead> <tr> <th>Month</th> <th>Days</th> </tr> </thead> <tbody> <tr class="danger"> <td>January</td> <td>31</td> <tr class="active"> <td>February</td> <td>28<span class="text-danger">*</span></td> <tr class="success"> <td>March</td> See: 14-table.html

Buttons To use a button, simply write class="btn btn-default". Can use <button> tag or <a> tag: <button type="button" class="btn btn-default">Button Text</button> <a href="..." class="btn btn-default">Button Text</a> Other button classes are: .btn-primary, .btn-success, .btn-info, .btn-warning, .btn-danger, and .btn-link Button sizes can be defined with the following classes: .btn-lg (large button), .btn-sm (small button), and .btn-xs (extra small button). 21-icon button.html

Styling buttons <div class="container"> <div class="row"> <div class="col-md-8 text-center"> <br /> <div class="btn-group"> <input class="btn" type="submit" value="Save" /> <button class="btn btn-danger">Delete</button> <a href="#" class="btn btn-primary">Update</a> </div> <div class="col-md-4"> See: 15-buttons.html

Button Classes Class Description .btn Adds basic styling to any button .btn-default Indicates a default/standard button .btn-primary Provides extra weight and identifies primary action in set of buttons .btn-success Indicates a successful or positive action .btn-info Contextual button for informational alert messages .btn-warning Indicates caution should be taken with this action .btn-danger Indicates a dangerous or potentially negative action .btn-link Makes a button look like a link (will still have button behavior) .btn-lg Makes a large button .btn-sm Makes a small button .btn-xs Makes an extra small button .btn-block Makes a block-level button (spans th full width of the parent element) .active Makes the button appear pressed .disabled Makes the button disabled

See: 16-modal-dialog.html

Menu System See: 17-menu.html

Typography Classes Class Description .lead Makes a paragraph stand out .small smaller text (set to 85% of the size of the parent) .text-left left-aligned text .text-center center-aligned text .text-right right-aligned text .text-justify justified text .text-nowrap no wrap text .text-lowercase lowercased text .text-uppercase uppercased text .text-capitalize capitalized text .initialism Displays text inside the <abbr> element in a slightly smaller font size .blockquote-reverse a blockquote with right-aligned content .list-unstyled Removes the default list-style and left margin on list items (works on both <ul> and <ol>). .list-inline Places all list items on a single line

Bootstrap Form Layouts Bootstrap provides three types of form layouts: Vertical form (this is default) Horizontal form Inline form Standard rules for all the three types of form layout: Add role="form" to the <form> element Wrap labels and form controls in a <div> element with class="form-group" (needed for optimum spacing) Add class="form-control" to all textual <input>, <textarea>, and <select> elements 19-FormLayouts.html

Jumbotron A Jumbotron indicates a big box for calling extra attention to special content A Jumbotron is displayed as a grey box with rounded corners and enlarged text inside it. 20-jumbotron.html <div class="container"> <div class="jumbotron"> <h1>My first Bootstrap website!</h1> <p>This page will grow as we add more and more stuff to it.</p> </div>

<img> classes Example: Description .img-rounded Adds rounded corners to an image (not available in IE8) .img-circle Shapes the image to a circle (not available in IE8) .img-thumbnail Shapes the image to a thumbnail .img-responsive Makes an image responsive (will scale nicely to the parent element) Example: <img src="cinqueterre.jpg" class="img-responsive" alt="Cinque Terre">

Bootstrap Themes http://bootswatch.com/ Name CDN Cerulean http://bootswatch.com/cerulean/bootstrap.min.css Cosmo http://bootswatch.com/cosmo/bootstrap.min.css Cyborg http://bootswatch.com/cyborg/bootstrap.min.css Darkly http://bootswatch.com/darkly/bootstrap.min.css Flatly http://bootswatch.com/flatly/bootstrap.min.css Journal http://bootswatch.com/journal/bootstrap.min.css Lumen http://bootswatch.com/lumen/bootstrap.min.css Readable http://bootswatch.com/readable/bootstrap.min.css Slate http://bootswatch.com/slate/bootstrap.min.css Superhero http://bootswatch.com/superhero/bootstrap.min.css United http://bootswatch.com/united/bootstrap.min.css