Bootstrap with top nav fixed + Bootstro
HTML
<script src="//netdna.bootstrapcdn.com/bootstrap/2.3.2/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/2.3.2/css/bootstrap.min.css">
<!-- Part 1: Wrap all page content here -->
<div id="wrap">
<!-- Fixed navbar -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" href="#">Project name</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li><a href="#" id='tutorial'>Tutorial</a></li>
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<!-- Begin page content -->
<div class="container">
<div class="page-header">
</div>
<p class="lead bootstro" data-bootstro-title='Title' data-bootstro-content="Description." data-bootstro-width="400px" data-bootstro-placement='bottom' data-bootstro-step='0'>Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added within <code>#wrap</code> with <code>padding-top: 60px;</code> on the <code>.container</code>.</p>
<p class="bootstro" data-bootstro-title='Title' data-bootstro-content="Description." data-bootstro-width="400px" data-bootstro-placement='bottom' data-bootstro-step='1'>Back to <a href="./sticky-footer.html">the sticky footer</a> minus the navbar.</p>
</div>
<div id="push"></div>
</div>
<div id="footer">
<div class="container">
<p class="muted credit">Example courtesy <a href="http://martinbean.co.uk">Martin...
CSS
/* Sticky footer styles
-------------------------------------------------- */
html,
body {
height: 100%;
/* The html and body elements cannot have any padding or margin. */
}
/* Wrapper for page content to push down footer */
#wrap {
min-height: 100%;
height: auto !important;
height: 100%;
/* Negative indent footer by it's height */
margin: 0 auto -60px;
}
/* Set the fixed height of the footer here */
#push,
#footer {
height: 60px;
}
#footer {
background-color: #f5f5f5;
}
/* Lastly, apply responsive CSS fixes as necessary */
@media (max-width: 767px) {
#footer {
margin-left: -20px;
margin-right: -20px;
padding-left: 20px;
padding-right: 20px;
}
}
/* Custom page CSS
-------------------------------------------------- */
/* Not required for template or sticky footer method. */
#wrap > .container {
padding-top: 60px;
}
.container .credit {
margin: 20px 0;
}
code {
font-size: 80%;
}
// bootstro
.bootstro-next-btn
{
float:right;
}
.bootstro-prev-btn
{
float:left;
}
.bootstro-backdrop
{
opacity: 0.5;
background-color: #000000;
bottom: 0;
left: 0;
position: fixed;
right: 0;
top: 0;
z-index: 1;
filter: alpha(opacity = 50);
}
.bootstro-highlight
{
z-index: 9999;
position: relative;
border: 1px solid white;
background-color: white;
}
.bootstro-finish-btn-wrapper
{
/*border-top:1px solid #eee;*/
padding-top:10px;
text-align:center;
clear:both;
}
.bootstro-nav-wrapper
{
margin-top:10px;
}
.bootstro-nav-wrapper button, .bootstro-finish-btn-wrapper button
{
font-size:12px !important;
padding : 3px 5px 3px 5px !important;
...
JavaScript
$("#tutorial").click(function(){
bootstro.start('.bootstro', {});
});
/**
* Bootstro.js Simple way to show your user around, especially first time users
* Http://github.com/clu3/bootstro.js
*
* Credit thanks to
* Revealing Module Pattern from
* http://enterprisejquery.com/2010/10/how-good-c-habits-can-encourage-bad-javascript-habits-part-1/
*
* Bootstrap popover variable width
* http://stackoverflow.com/questions/10028218/twitter-bootstrap-popovers-multiple-widths-and-other-css-properties
*
*/
$(document).ready(function(){
//Self-Executing Anonymous Func: Part 2 (Public & Private)
(function( bootstro, $, undefined ) {
var $elements; //jquery elements to be highlighted
var count;
var popovers = []; //contains array of the popovers data
var activeIndex = null; //index of active item
var defaults = {
nextButtonText : 'Next »', //will be wrapped with button as below
//nextButton : '<button class="btn btn-primary btn-mini bootstro-next-btn">Next »</button>',
prevButtonText : '« Prev',
//prevButton : '<button class="btn btn-primary btn-mini bootstro-prev-btn">« Prev</button>',
finishButtonText : '<i class="icon-ok"></i> Ok I got it, get back to the site',
//finishButton : '<button class="btn btn-mini btn-success bootstro-finish-btn"><i class="icon-ok"></i> Ok I got it, get back to the site</button>',
stopOnBackdropClick : true,
stopOnEsc : true,
//onComplete : function(params){} //params = {idx : activeIndex}
//onExit : function(params){} //params = {idx : activeIndex}
//onStep : function(params){} //params = {idx : activeIndex, direction : [next|prev]}
//url : String // ajaxed url to get show data from
margin : 100, //if the currently shown element's margin is less than this value
// the element...