Bootstrap
Bootstrap
Bootstrap
BOOTSTRAP
Twitter Bootstrap is the most popular front end framework in the recent
time.
It is sleek, intuitive, and powerful mobile first front-end framework for
faster and easier web development.
It uses HTML, CSS and Javascript.
Browser Support
It is supported by all popular browsers.
Easy to get started
With just the knowledge of HTML and CSS anyone can get started
with Bootstrap.
Bootstrap official site has a good documentation.
Responsive design
Bootstrap's responsive CSS adjusts to Desktops, Tablets and
Mobiles.
Provides a clean and uniform solution for building an interface for
developers.
It contains beautiful and functional built-in components which are
easy to customize.
It also provides web based customization.
And best of all it is an open source.
Components
JavaScript Plugins
Customize
Download Bootstrap
You can download the latest version of Bootstrap
from https://getbootstrap.com/.
Download Bootstrap
Download Source
Clicking this, you can get the latest Bootstrap LESS and
JavaScript source code directly from GitHub.
File structure
Precompiled Bootstrap
Once the compiled version Bootstrap is downloaded, extract the ZIP file,
and you will see the following file/directory structure −
As you can see, there are compiled CSS and JS (bootstrap.*), as well as
compiled and minified CSS and JS (bootstrap.min.*).
Fonts from Glyphicons are included, as it is the optional Bootstrap
theme.
If you have downloaded the Bootstrap source code then the file structure
would be as follows −
The files under less/, js/, and fonts/ are the source code for Bootstrap
CSS, JS, and icon fonts (respectively).
The dist/ folder includes everything listed in the precompiled download
section above.
docs-assets/, examples/, and all *.html files are Bootstrap documentation.
What is a Grid?
In graphic design, a grid is a structure (usually two-dimensional) made
up of a series of intersecting straight (vertical, horizontal) lines used to
structure the content.
It is widely used to design layout and content structure in print design.
In web design, it is a very effective method to organise and structure
content, makes the websites easy to scan and reduces the cognitive load
on users.
Layout
o Design to smaller widths first.
o Base CSS address mobile device first; media queries address for
tablet, desktops.
Progressive Enhancement
o Add elements as screen size increases.
Rows must be placed within a .container class for proper alignment and
padding.
Use rows to create horizontal groups of columns.
Content should be placed within the columns, and only columns may be
the immediate children of rows.
Predefined grid classes like .row and .col-xs-4 are available for quickly
making grid layouts
Columns create gutters (gaps between column content) via padding.
Grid columns are created by specifying the number of twelve available
columns you wish to span.
Grid options
The following table summarizes aspects of how Bootstrap grid system works
across multiple devices
Basic Grid Structure
<h1>Hello, world!</h1>
</div>
</div>
Column Ordering
You can easily change the order of built-in grid columns with .col-md-
push-* and .col-md-pull-* modifier classes where * range from 1 to 11.
In the following example we have two columns layout with left column
being the narrowest and acting as a sidebar.
We will swap the order of these columns using .col-md-push-* and .col-
md-pull-* classes.
</div>
Bootstrap - Buttons
Anything that is given a class of .btn will inherit the default look of a
gray button with rounded corners.
However, Bootstrap provides some options to style buttons, which are
summarized in the following table −
<!-- Standard button -->
<button type = "button" class = "btn btn-default">Default Button</button>
<!-- Provides extra visual weight and identifies the primary action in a set of
buttons -->
<button type = "button" class = "btn btn-primary">Primary Button</button>
Button Size
The following table summarizes the classes used to get buttons of various
sizes.
<p>
<button type = "button" class = "btn btn-primary btn-lg">
Large Primary button
</button>
<p>
<button type = "button" class = "btn btn-primary">
Default size Primary button
</button>
<p>
<button type = "button" class = "btn btn-primary btn-sm">
Small Primary button
</button>
<p>
<button type = "button" class = "btn btn-primary btn-xs">
Extra small Primary button
</button>
<p>
<button type = "button" class = "btn btn-primary btn-lg btn-
block">
Block level Primary button
</button>
Bootstrap - Dropdowns
Dropdown menus are toggleable, contextual menus for displaying links
in a list format.
This can be made interactive with the dropdown JavaScript plugin.
To use dropdown, just wrap the dropdown menu within the
class .dropdown.
<div class = "dropdown">
</div>
Options
Alignment
Align the dropdown menu to right by adding the class .pull-
right to .dropdown-menu.
</div>