Site icon FahmidasClassroom

Responsive Website Design using Bootstrap

Responsive Website

Steps:

  1. Create Link for all necessary css and js files.
<link href="bootstrap.min.css" rel="stylesheet">
<link href="fonts.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
<script src="jquery.js"></script>
<script src="bootstrap.min.js"></script>

You can get the script for fonts.css and style.css files from the following link.

Fonts.css
Style.css

2. Create the top menu

<div class="navbar navbar-fixed-top" role="navigation" style="background-color:white">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#menu-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">CCSL</a>
</div>
<div class="collapse navbar-collapse" id="menu-1">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span></span>Services<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Diploma Courses</a></li>
<li><a href="#">Training Courses</a></li>
<li><a href="#">Hardware Courses</a></li>
</ul>
</li>
<li><a href="#">About Us</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
</div>
</div>

3. Add the image slider

<div id="slider" class=" slide" data-ride="carousel" data-interval="2000">
<!-- controls -->
<ol class="carousel-indicators" >
<li data-target="#slider" data-slide-to="0" class="active"></li>
<li data-target="#slider" data-slide-to="1"></li>
<li data-target="#slider" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<!-- slides -->
<div class="item active">
<div class="container">
<img src="images\01.jpg" />
</div>
</div>
<div class="item">
<div class="container">
<img src="images\02.jpg" />
</div>
</div>
<div class="item">
<div class="container">
<img src="images\03.jpg" />
</div>
</div>
</div>
<!-- left-right controls -->
<a class="left carousel-control" href="#slider" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
<a class="right carousel-control" href="#slider" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
</div><!-- /.carousel -->

4. Change the code to add color slider with text

Add carousel class in slider div and replace the slider image by color.

<div class="item active">
<div class="container">
<div class="carousel-caption">
<h1>Diploma Courses</h1>
<p>Computer Science and Engineering</p>
<p>Civil Engineering</p>
</div>
</div>
</div>
<div class="item">
<div class="container">
<div class="carousel-caption">
<h1>Training Courses</h1>
<p>Web Programming</p>
<p>Java Programming</p>
</div>
</div>
</div>
<div class="item">
<div class="container">
<div class="carousel-caption">
<h1>Hardware Courses</h1>
<p>Assembling</p>
<p>Troubleshooting</p>
</div>
</div>
</div>

 

5. Add next container div

<div class="container">
</div>

6. Add code for creating second menu

<nav class="navbar navbar-default navbar-static">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#menu-2">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- submenu elements for #b-menu-2 -->
<div class="collapse navbar-collapse" id="menu-2">
<ul class="nav navbar-nav">
<li ><a href="#"><span class="glyphicon glyphicon-home"></span> Home</a></li>
<li><a href="#"><span class="glyphicon glyphicon-user"></span> Register</a></li>
<li><a href="#"><span class="glyphicon glyphicon-lock"></span> Login</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-list"></span>Courses<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">PHP</a></li>
<li><a href="#">AngularJS</a></li>
<li><a href="#">JQuery</a></li>
<li class="divider"></li>
<li><a href="#">CodeIgniter</a></li>
<li><a href="#">Laravel</a></li>
<li class="divider"></li>
<li><a href="#">Wordpress</a></li>
</ul>
</li>
</ul>
</div><!-- /.nav-collapse -->
</nav>

7. Divide row by 9 and 3 columns.

<div class="row row-offcanvas row-offcanvas-right">
<div class="col-sm-9">
</div>
<div class="col-sm-3 sidebar-offcanvas" id="sidebar">
</div>
</div>

8. Add jumbotron in 9 columns

<div class="jumbotron">
<h1>CCSL</h1>
<p>Computer Training Center</p>
</div>

9. Divide this part into 6 and 6 columns and add 4 panels with heading

<div class="row">
<!-- column 1 -->
<div class="col-sm-6">
<!-- box 1 -->
<div class="panel panel-success panel-ht">
<div class="panel-heading">
<h3 class="panel-title">Web Design</h3>
</div>
<div class="panel-body">
<p>Learn HTML, Javascript, CSS3 and Bootstrap</p>
<p></p>
</div>
</div>
<!-- box 2 -->
<div class="panel panel-success panel-ht">
<div class="panel-heading">
<h3 class="panel-title">Web Programming</h3>
</div>
<div class="panel-body">
<p>Learn PHP, MySQL, JQuery etc.</p>
<p></p>
</div>
</div>
</div> <!-- /column 1 -->
<!-- column 2 -->
<div class="col-sm-6">
<!-- box 3 -->
<div class="panel panel-success panel-ht">
<div class="panel-heading">
<h3 class="panel-title">E-commerce website</h3>
</div>
<div class="panel-body">
<p>Learn Magento and woocommerce</p>
<p><a class="btn btn-default right" href="#" role="button" data-toggle="modal" data-target="#my-modal">Read More...</a></p>
</div>
</div>
<!-- box 4 -->
<div class="panel panel-success panel-ht">
<div class="panel-heading">
<h3 class="panel-title">PHP Framework</h3>
</div>
<div class="panel-body">
<p>Learn codeigniter, CakePHP, Laravel</p>
<p><a class="btn btn-default right" href="phpfm.html" target="_top" role="button">Read More...</a></p>
</div>
</div>
</div>
</div><!--/row-->

10. Add other form and other links as sidebar

<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Login Form</h3>
</div>
<div class="panel-body">
<form role="form">
<div class="form-group">
<label for="emailField">Email address</label>
<input type="email" class="form-control" id="emailField" placeholder="Enter email">
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" class="form-control" id="password" placeholder="Enter password">
</div>
<button type="submit" class="btn btn-default">Login</button>
</form>
</div>
</div>
<div class="list-group" role="navigation">
<a href="https://idb-bisew.info" target="_top" class="list-group-item">IDB-Bisew</a>
<a href="#" class="list-group-item">W3School</a>
<a href="#" class="list-group-item">TutorialsPoint</a>
</div>
<!-- box 6 -->
<div class="panel panel-info">
<div class="panel-body">
<a href="https://ajkerdeal.com/"><img src="images/ad.PNG" width="100%"/></a>
</div>
</div>

11. Add footer of the page


<footer>
<nav class="navbar navbar-default navbar-static-bottom" role="navigation">
<p class="navbar-text">&copy Copyright 2018</p>
<p class="navbar-text navbar-right"><a href="https://www.tutorials4uhelp.com/" target="_top">tutorials4u Help</a></p>
</nav&gt
</footer>

12. Add model for one button

<div class="modal fade" id="my-modal" role="dialog" aria-labelledby="my-modal-l" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<div class="modal-title" id="my-modal-l">
<h3>E-commerce course details</h3>
</div>
<div class="modal-body">
<ul>
<li>Magento</li>
<li> WooCommerce </li>
</ul>
</div>
</div>
</div>
</div>

13. Check the responsiveness of your site.

Good Luck

Exit mobile version