Bootstrap Code Samples

Twitter Bootstrap makes life easy. If you are not much into designing layouts from pure CSS, twitter-bootstrap is ideal for you. Following shows some code samples that you might often need. Setting up bootstrap is trivial.

Setting-Up

- Download Bootstrap from http://getbootstrap.com/
- Unzip the folder. You may find following folders in it.


- Include these three folders in your Project folder.
- Add link to your index.html to bootstrap.css within in <head> tag as follows

<link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>

- Add bootstrap script tags just above the </body> tag. Make sure you have jquery.js file

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>

- That's it. To check if you have properly setup bootstrap, Write this line of code within the body section

<button class="btn btn-success">Test</button>

- Open up index.html in a browser. You should see green color Test button on the screen.


Nav-Bar Sample


Carousel Sample 


Grid-System Sample 

Comments

  1. This comment has been removed by the author.

    ReplyDelete

Post a Comment

Popular posts from this blog

Dependency Injection in ASP.NET MVC 5 with StructureMap

Real-time web with Node.js & Socket.io

First Look at AngularJS 2.0