Thursday, January 26, 2017

Bootstrap Example-Three ( Grid Basic)

Bootstrap Example-Three ( Grid Basic)

Three equal columns

Write the code on your index.html :

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container-fluid">
  <h1>Hello World!</h1>
  <p>Resize the browser window to see the effect.</p>
  <div class="row">
    <div class="col-sm-4" style="background-color:Green;">Home</div>
    <div class="col-sm-4" style="background-color:Yellow;">Service</div>
    <div class="col-sm-4" style="background-color:Red;">Contact Us</div>
  </div>
</div>

</body>
</html>

You will get the Result:











Write the code on your index.html :

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
  <h1>Hello World!</h1>
  <p>Resize the browser window to see the effect.</p>
  <div class="row">
    <div class="col-sm-4" style="background-color:Green;">Home</div>
    <div class="col-sm-4" style="background-color:Yellow;">Service</div>
    <div class="col-sm-4" style="background-color:Red;">Contact Us</div>
  </div>
</div>

</body>
</html>

If you look the difference 

<div class="container-fluid">
 <div class="container">

we find that left and right hand side some change occur.

You will get the Result:

Follow the links and change the codes and click run and find the change.







No comments:

Post a Comment