a beginner's guide to twitter bootstrap

35
Leading Front-end Framework

Upload: mitali-cyrus

Post on 03-Jul-2015

1.238 views

Category:

Technology


3 download

DESCRIPTION

A "Lets get Started" Guide to twitter bootstrap. Starting with the importance. I am working on it and will improve it later on, so ignore some 'localhost' links, this presentation was for training purpose.

TRANSCRIPT

Page 1: A beginner's guide to twitter bootstrap

Leading Front-end Framework

Page 2: A beginner's guide to twitter bootstrap

What is a framework

Basic Conceptual Structure

Used in Development

Provides Generic

Functionality

A general Definition

Page 3: A beginner's guide to twitter bootstrap

Front End Framework

CSS Javascript/JQuery

Front-end

Framework

Page 4: A beginner's guide to twitter bootstrap

Why do we need a

framework

Before After

Page 5: A beginner's guide to twitter bootstrap

The Blood and Bones of Bootstrap

Page 6: A beginner's guide to twitter bootstrap

NONE:

<button>Bootstrap</button>

Using Bootstrap Classes:

<button

class=“btn”>Bootstrap</butto

n>

<button class=“btn btn-

primary”>Bootstrap</button>

The whole bootstrap

works on classes

Page 7: A beginner's guide to twitter bootstrap

none

btn

+ btn-primary

Snapshots

Page 8: A beginner's guide to twitter bootstrap

Fluid Vs Non-Fluid

Page 9: A beginner's guide to twitter bootstrap

940px Width

Centered

Page 12: A beginner's guide to twitter bootstrap

<div class=“container”>

<h1>Heading</h1>

Some random content.

.

.

.

.

</div>

Container

(For disabling Responsive bootstrap, comment out the bootstrap-responsive.css)

Page 13: A beginner's guide to twitter bootstrap

<div class=“container-fluid”>

<h1>Heading</h1>

Some random content.

.

.

.

.

</div>

Container-fluid

Page 14: A beginner's guide to twitter bootstrap

Fluid Vs Non-Fluid

Page 15: A beginner's guide to twitter bootstrap

Row means a 100% width

div.

<div class=“row”>

<h1>Heading</h1>

Some random content.

.

.

.

.

</div>

ROW

Page 16: A beginner's guide to twitter bootstrap

Fluid row is responsive and adjusts itself according to screen size.

<div class=“row-fluid”>

<h1>Heading</h1>

Some random content.

.

.

.

.

</div>

Lets see the use of rows.

Row-fluid

Page 17: A beginner's guide to twitter bootstrap

On Resizing the browser window

Page 18: A beginner's guide to twitter bootstrap
Page 19: A beginner's guide to twitter bootstrap
Page 20: A beginner's guide to twitter bootstrap

Syntax

<div class=“span12”>

….

</div>

<div class=“span6”>

</div>

<div class=“span6”>

</div>

Appearance

1170 px

570 px

570 px

Page 21: A beginner's guide to twitter bootstrap

Syntax

• Span12 – full width;

• If respnsive css is

included:

• Span12 width:1170px (same

as responsive container)

• Span6 width:570px etc

• If responsive css is not

included:

• Span12 width: 940px (same

as irresponsive container)

• Span6 width:460px;

Appearance

1170 px

570 px

570 px

Page 22: A beginner's guide to twitter bootstrap

1170 px

570 px

Page 23: A beginner's guide to twitter bootstrap

940 px

460 px

Page 24: A beginner's guide to twitter bootstrap
Page 25: A beginner's guide to twitter bootstrap

Bootstrap’s version of some HTML elements. Default CSS.

Page 26: A beginner's guide to twitter bootstrap

<h1>

<h2>

<h3>

<h4>

<h5>

<h6>

Page 27: A beginner's guide to twitter bootstrap

• I wanna say <strong>Hello</strong>

• I wanna say <em>Hello</em>

• <small>This line of text is meant to be treated as fine print.</small>

I wanna say Hello

I wanna say Hello

I wanna say Hello

Page 28: A beginner's guide to twitter bootstrap

Simply add THE required class, and bootstrap will take care of the rest.

Page 29: A beginner's guide to twitter bootstrap
Page 30: A beginner's guide to twitter bootstrap

• <p class="text-left">Left aligned text.</p>

• <p class="text-center">Center aligned text.</p>

• <p class="text-right">Right aligned text.</p>

Page 31: A beginner's guide to twitter bootstrap

As simple as it seems.

Page 32: A beginner's guide to twitter bootstrap

<table><thead>

..

..

</thead>

<tbody>

….

..

..

</tbody>

</table>

Page 33: A beginner's guide to twitter bootstrap

<table class=“table”>

</table>

http://localhost/pikachu/index.php/home/normal/tabl

e

Page 34: A beginner's guide to twitter bootstrap

Before After

And all we did was, add class=“table”, nothing else. I swear to god. ;)

Page 35: A beginner's guide to twitter bootstrap