Skip to content

Instantly share code, notes, and snippets.

@mxmbadev
Created January 19, 2016 15:44
Show Gist options
  • Save mxmbadev/9ef512a352810abdae7c to your computer and use it in GitHub Desktop.
Save mxmbadev/9ef512a352810abdae7c to your computer and use it in GitHub Desktop.
A responsive Transparent Nav within a background image
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<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="#">Brand</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="#">Home <span class="sr-only">(current)</span></a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="container-fluid">
<div class="row mgn-top">
<div class="col-md-12 backBG">
<div class="col-md-6 center-block">
<img class="img-responsive" src="/assets/clearchoice_logo2.png" alt="Clear Choice Window Cleaning">
</div>
<div class="col-sm-1 center-block">
<button class="btn btn-lg"><a href="#"></a>Welcome</button>
</div>
</div>
</div>
</div>
$blue: #00adef;
$dark: #272727;
$orange: #ff9600;
.navbar{
margin-top: 50px;
margin-bottom: 0;
background: transparent;
border: none;
border-radius: 0;
z-index: 1030;
}
.btn{
background-color: $blue;
}
.center-block{
float: none;
}
.mgn-top{
margin-top:-100px;
}
.backBG{
background-image: url('/assets/clrbg2.png');
padding: 160px 60px;
height: 1000px;
position: relative;
overflow: hidden;
width: 100%;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment