Showing posts with label Bootstrap. Show all posts
Showing posts with label Bootstrap. Show all posts

Friday, 1 May 2015

Bootstrap Website

Creating a website with Bootstrap is easy and fun. If you know HTML and CSS or have a basic knowledge to code them, then you wont have much a problem to code in Bootstrap. Bootstrap used both HTML and CSS properties for designing. It commonly uses the HTML5 doctype.

You should always remember to put the HTML5 doctype declaration and also the lang attribute at the starting of the webpage.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
Body content......
</body>
</html>
Bootstrap is mainly used to create mobile responsive web pages. The good point is that you don't have to view the same big desktop page in your mobile. You don't have always minimize and maximize anytime you want to click a link or view the text. Mobile-first styles are actually a part of the Bootstrap core framework. But in order to get proper mobile rendering you have to add the following meta code in the head section.

<meta name="viewport" content="width=device-width, initial-scale=1">
  • "width=device-width" - This part sets the width of the page to follow the width of the device.
  • "initial-scale=1" - This sets the initial zoom level when the page is first loaded.
Bootstrap also requires a container to wrap site contents. But remember that you cannot put one container inside another. There are mainly two container classes.
  • ".container" - This provides with a fixed width responsive container.
  • ".container-fluid" - This provides with a full width container spreading across the entire width of the viewport.
Container
For Example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h1>My Bootstrap Webpage</h1>
<p>I love learning Bootstrap.</p>
</div>
</body>
</html>
Container-Fluid
For Example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container-fluid">
<h1>My Bootstrap Webpage</h1>
<p>I love learning Bootstrap.</p>
</div>
</body>
</html>

Friday, 24 April 2015

What is Bootstrap?

Bootstrap is a powerful free front-end framework for faster and better web development. Bootstrap includes HTML and also CSS based designs for typography, layout, forms, buttons, images etc. It also contains many JavaScript plugins. Bootstrap also has the ability to create responsive websites. Responsive websites are those websites that automatically adjust their design so as to work perfectly in all devices ranging from smart phones to desktop PC.

Bootstrap was developed by Mark Otto and Jacob Thornton at Twitter, and released as an open source product in August 2011 on GitHub.

Advantages of Bootstrap

  • It is easy to use: Anybody who knows basic knowledge in HTML and CSS can design using Bootstrap.
  • Responsive: Used to create responsive pages which adjust automatically as the device needs.
  • Mobile-first framework: Mobile-first are also a part of the core framework.
  • Browser compatible: Bootstrap is compatible with all browsers now a days.

Get Bootstrap

There are two ways by which you can access Bootstrap.

Bootstrap CDN

You can also host Boostrap yourself, you can just include it from a CDN (Content Delivery Network). MaxCDN provides the CDN support fot Boostrap.

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">

<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">

Sunday, 19 April 2015

Introduction to Bootstrap 3

Bootstrap 3
Bootstrap is a powerful and popular HTML, CSS, and JavaScript framework for creating responsive, mobile-first websites for faster and easier web develpoing. It can be designed by everyone who knows a little knowledge of HTML, CSS or JavaScript or all. It is user-friendly and is made for folks of all skill levels, devices of all shapes, and projects of all sizes.

Bootstrap is completely free to download. Download it here - getbootstrap.com.

For example:
<div class="container">
  <div class="jumbotron">
    <h1>My First Page</h1>
    <p>Resize this page and see the magic!</p>
  </div>
  <div class="row">
    <div class="col-sm-4">
      <h3>Column 1</h3>
      <p>This is just a sample text...</p>
      <p>This is just a sample text...This is just a sample text...</p>
    </div>
    <div class="col-sm-4">
      <h3>Column 2</h3>
      <p>This is just a sample text...</p>
      <p>This is just a sample text...This is just a sample text...</p>
    </div>
    <div class="col-sm-4">
      <h3>Column 3</h3>
      <p>This is just a sample text...</p>
      <p>This is just a sample text...This is just a sample text...</p>
    </div>
  </div>
</div>