Hamburger Overlay menu animation - html

I'm creating an animation for a website menu. I created much of it, But The problem is when the overlay animation starts, the content appears earlier. The content should appear as the overlay animation moves from left to right. For reference, please check the menu animation here, https://www.mission-haut-brion.com, Below is the code that I have tried. Any help would be appreciated.
You can find a working fiddle here of the code. https://jsfiddle.net/dk724f6p/.
<header>
<div >
<h1><img style="" src="assets/img/logo.jpg"></h1>
REFERENCES
<a onclick="openNav()" style="filter: brightness(1);" href="#">
<i ></i>
<i ></i>
<i ></i>
</a>
</div>
<div id="myNav" class="overlay45">
<header >
×
<div id="overlay-content" >
<div ></div>
<div >
<div>
<div >
<img src="assets/img/logo2.png>
</div>
</div>
<div >
<div></div>
<div>
<a id="menu-anim-fix">Home Page</a>
</div>
<div>
<a>Our Offer</a>
</div>
<div></div>
</div>
<div>
<div></div>
<div>
<a id="menu-anim-fix" href="ourwork.html">Our Work</a>
</div>
<div class="col-sm-12 col-md-4" style="text-align: right;">
<a id="menu-anim-fix" href="stepform.html">Order Us</a>
</div>
<div class="col-sm-12 col-md-2"></div>
</div>
<div class="row mb-5">
<div class="col-sm-12 col-md-2"></div>
<div class="col-sm-12 col-md-4">
<a id="menu-anim-fix" href="website-art.html">Website Art</a>
</div>
<div class="col-sm-12 col-md-4" style="text-align: right;">
Contact Us
</div>
<div class="col-sm-12 col-md-2"></div>
</div>
<div class="row">
<div class="col-sm-12 col-md-12" style="text-align: center;">
<a id="menu-anim-fix" href="refrences.html">REFERENCES</a>
</div>
</div>
<div class="row mt-5">
<div class="col-md-12 mt-5" style="text-align: center;">
<p class="mt-5" style="color: #fff;font-size: 12px;">2019- All Rights Reserved</p>
</div>
</div>
</div>
<div class="col-md-2" style="border-left: 1px solid #fff" ></div>
</div>
</header>
</div>
</header>
<script>
function openNav() {
document.getElementById("myNav").style.width = "100%";
setTimeout(function(){
document.getElementById("overlay-content").style.display = "flex";
// document.getElementById("menu-anim-fix").style.display = "flex";
}, 100);
}
function closeNav() {
document.getElementById("myNav").style.width = "0%";
document.getElementById("overlay-content").style.display = "none";
}
</script>
</body>
</html>
header a {
letter-spacing: 8px;
text-transform: uppercase;
color: #fff;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
text-decoration:none !important;
}
header a:hover {
color: #d3a356;
letter-spacing: 10px;
}
.overlay45 {
height: 100%;
width: 0;
position: fixed;
z-index: 49;
top: 0;
left: 0;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0, 0.9);
overflow-x: hidden;
transition: 1s;
}
.overlay-content{
transition: 1s;
}
.overlay45 a {
display: block;
transition: 0.3s;
}
/*.overlay-content {
position: relative;
width: 100%;
}*/
.overlay45 .closebtn {
position: absolute;
top: -10px;
right: 65px;
font-size: 60px;
z-index: 50;
}
#media screen and (max-height: 450px) {
.overlay45 a {font-size: 20px}
.overlay45 .closebtn {
font-size: 40px;
top: 15px;
right: 35px;
}
}
#media screen and (max-width: 600px) {
.overlay45 .closebtn {
position: absolute;
top: -10px;
right: 20px;
font-size: 60px;
z-index: 50;
}
}
#media screen and (max-width: 767px) {
header .col-sm-12 {
text-align: center !important;
}
header .col-md-2 {
border-right: none !important;
border-left: none !important;
}
}
.refrences-website-fix{
padding-top: 10%;
}
.refrences-website-fix a{
font-size: 35px;
font-weight: 900;
}
.refrences-website-fix .corvin:hover
{
background-image: url(../img/logo.jpg);
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.header-top {
padding: 0 10px !important;
}
.header-top img{
width: 50px;
height: 50px;
}
#media screen and (max-width: 760px) {
.header-top img{
width: 80px;
height: 80px;
}
}
.header-top {
padding: 0 60px;
position: fixed;
top: 0;
width: 100%;
z-index: 16;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.header-top a{
/*color: grey !important;*/
}
.header-top i{
background: #fff !important;
}
h1 {
line-height: 70px;
height: 70px;
}
h1 a {
display: block;
padding: 0 10px;
}
.toggle-menu {
width: 50px;
height: 50px;
display: inline-block;
position: relative;
top: 20px;
}
.toggle-menu i {
position: absolute;
display: block;
height: 2px;
background: white;
width: 24px;
left: 10px;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
}
.toggle-menu i:nth-child(1) {
top: 16px;
}
.toggle-menu i:nth-child(2) {
top: 24px;
}
.toggle-menu i:nth-child(3) {
top: 32px;
}
/*.open-menu i:nth-child(1) {
top: 25px;
-webkit-transform: rotateZ(45deg);
-ms-transform: rotate(45deg);
transform: rotateZ(45deg);
}
.open-menu i:nth-child(2) {
background: transparent !important;
}
.open-menu i:nth-child(3) {
top: 25px;
-webkit-transform: rotateZ(-45deg);
-ms-transform: rotate(-45deg);
transform: rotateZ(-45deg);
}*/
nav {
height: 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
background:#000;
position: fixed;
width: 100%;
/* -webkit-transition: all 1s;
-o-transition: all 1s;
transition: all 1s;*/
visibility: hidden;
opacity: 0;
-webkit-transition: opacity 1s, visibility 0s 1s;
transition: opacity 1s, visibility 0s 1s;
z-index: 15;
}
.clearfix:before,
.clearfix:after {
content: "";
display: table;
}
.clearfix:after {
clear: both;
}
.l-left {
float: left;
}
.l-right {
float: right;
}
.ref-menu-fix{
text-align: center;
margin: 0 auto;
width: 50%;
font-size: 24px;
letter-spacing: 8px;
color: #fff !important;
margin-top:20px;
text-transform: uppercase;
}
.toggle-menu {
width: 50px;
height: 50px;
display: inline-block;
position: relative;
top: 20px;
}
.toggle-menu i {
position: absolute;
display: block;
height: 2px;
background: white;
width: 24px;
left: 10px;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
}
.toggle-menu i:nth-child(1) {
top: 16px;
}
.toggle-menu i:nth-child(2) {
top: 24px;
}
.toggle-menu i:nth-child(3) {
top: 32px;
}

Check this, i have fixed your issue..
function openNav() {
document.getElementById("myNav").style.left = "0";
setTimeout(function(){
document.getElementById("overlay-content").style.display = "flex";
// document.getElementById("menu-anim-fix").style.display = "flex";
}, 100);
}
function closeNav() {
document.getElementById("myNav").style.left = "-100%";
document.getElementById("overlay-content").style.display = "none";
}
header a {
letter-spacing: 8px;
text-transform: uppercase;
color: #fff;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
text-decoration:none !important;
}
header a:hover {
color: #d3a356;
letter-spacing: 10px;
}
.overlay45 {
height: 100%;
width: 100%;
position: fixed;
z-index: 49;
top: 0;
left: -100%;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0, 0.9);
overflow-x: hidden;
transition: 1s;
}
.overlay-content{
transition: 1s;
}
.overlay45 a {
display: block;
transition: 0.3s;
}
/*.overlay-content {
position: relative;
width: 100%;
}*/
.overlay45 .closebtn {
position: absolute;
top: -10px;
right: 65px;
font-size: 60px;
z-index: 50;
}
#media screen and (max-height: 450px) {
.overlay45 a {font-size: 20px}
.overlay45 .closebtn {
font-size: 40px;
top: 15px;
right: 35px;
}
}
#media screen and (max-width: 600px) {
.overlay45 .closebtn {
position: absolute;
top: -10px;
right: 20px;
font-size: 60px;
z-index: 50;
}
}
#media screen and (max-width: 767px) {
header .col-sm-12 {
text-align: center !important;
}
header .col-md-2 {
border-right: none !important;
border-left: none !important;
}
}
.refrences-website-fix{
padding-top: 10%;
}
.refrences-website-fix a{
font-size: 35px;
font-weight: 900;
}
.refrences-website-fix .corvin:hover
{
background-image: url(../img/logo.jpg);
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.header-top {
padding: 0 10px !important;
}
.header-top img{
width: 50px;
height: 50px;
}
#media screen and (max-width: 760px) {
.header-top img{
width: 80px;
height: 80px;
}
}
.header-top {
padding: 0 60px;
position: fixed;
top: 0;
width: 100%;
z-index: 16;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.header-top a{
/*color: grey !important;*/
}
.header-top i{
background: #fff !important;
}
h1 {
line-height: 70px;
height: 70px;
}
h1 a {
display: block;
padding: 0 10px;
}
.toggle-menu {
width: 50px;
height: 50px;
display: inline-block;
position: relative;
top: 20px;
}
.toggle-menu i {
position: absolute;
display: block;
height: 2px;
background: white;
width: 24px;
left: 10px;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
}
.toggle-menu i:nth-child(1) {
top: 16px;
}
.toggle-menu i:nth-child(2) {
top: 24px;
}
.toggle-menu i:nth-child(3) {
top: 32px;
}
/*.open-menu i:nth-child(1) {
top: 25px;
-webkit-transform: rotateZ(45deg);
-ms-transform: rotate(45deg);
transform: rotateZ(45deg);
}
.open-menu i:nth-child(2) {
background: transparent !important;
}
.open-menu i:nth-child(3) {
top: 25px;
-webkit-transform: rotateZ(-45deg);
-ms-transform: rotate(-45deg);
transform: rotateZ(-45deg);
}*/
nav {
height: 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
background:#000;
position: fixed;
width: 100%;
/* -webkit-transition: all 1s;
-o-transition: all 1s;
transition: all 1s;*/
visibility: hidden;
opacity: 0;
-webkit-transition: opacity 1s, visibility 0s 1s;
transition: opacity 1s, visibility 0s 1s;
z-index: 15;
}
.clearfix:before,
.clearfix:after {
content: "";
display: table;
}
.clearfix:after {
clear: both;
}
.l-left {
float: left;
}
.l-right {
float: right;
}
.ref-menu-fix{
text-align: center;
margin: 0 auto;
width: 50%;
font-size: 24px;
letter-spacing: 8px;
color: #fff !important;
margin-top:20px;
text-transform: uppercase;
}
.toggle-menu {
width: 50px;
height: 50px;
display: inline-block;
position: relative;
top: 20px;
}
.toggle-menu i {
position: absolute;
display: block;
height: 2px;
background: white;
width: 24px;
left: 10px;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
}
.toggle-menu i:nth-child(1) {
top: 16px;
}
.toggle-menu i:nth-child(2) {
top: 24px;
}
.toggle-menu i:nth-child(3) {
top: 32px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
</head>
<body style="background-color: #000;">
<header>
<div class="header-top clearfix">
<h1 class="l-left link"><img style="" src="assets/img/logo.jpg" height="100" width="100" alt=""></h1>
REFERENCES
<a class="l-right link toggle-menu" style="cursor:pointer;" onclick="openNav()" style="filter: brightness(1);" href="#">
<i ></i>
<i ></i>
<i ></i>
</a>
<!-- <span class="l-right link toggle-menu" style="font-size:30px;cursor:pointer" onclick="openNav()">☰ open</span> -->
</div>
<div id="myNav" class="overlay45">
<header style="background-color: #1f1f1f; height: 100%;">
×
<div class="row overlay-content" id="overlay-content" style="height: 100%; position: fixed;display: none;width: 100%;">
<div class="col-md-2" style="border-right: 1px solid #fff" ></div>
<div class="col-md-8">
<div class="row mt-5">
<div class="col-md-12" style="text-align: center;">
<img src="assets/img/logo2.png" style="width: 20%; margin: 1 auto;" alt="">
</div>
</div>
<div class="row mb-5">
<div class="col-sm-12 col-md-2"></div>
<div class="col-sm-12 col-md-4">
<a id="menu-anim-fix" href="index.html">Home Page</a>
</div>
<div class="col-sm-12 col-md-4" style="text-align: right;">
<a id="menu-anim-fix" href="ouroffer.html">Our Offer</a>
</div>
<div class="col-sm-12 col-md-2"></div>
</div>
<div class="row mb-5">
<div class="col-sm-12 col-md-2"></div>
<div class="col-sm-12 col-md-4">
<a id="menu-anim-fix" href="ourwork.html">Our Work</a>
</div>
<div class="col-sm-12 col-md-4" style="text-align: right;">
<a id="menu-anim-fix" href="stepform.html">Order Us</a>
</div>
<div class="col-sm-12 col-md-2"></div>
</div>
<div class="row mb-5">
<div class="col-sm-12 col-md-2"></div>
<div class="col-sm-12 col-md-4">
<a id="menu-anim-fix" href="website-art.html">Website Art</a>
</div>
<div class="col-sm-12 col-md-4" style="text-align: right;">
Contact Us
</div>
<div class="col-sm-12 col-md-2"></div>
</div>
<div class="row">
<div class="col-sm-12 col-md-12" style="text-align: center;">
<a id="menu-anim-fix" href="refrences.html">REFERENCES</a>
</div>
</div>
<div class="row mt-5">
<div class="col-md-12 mt-5" style="text-align: center;">
<p class="mt-5" style="color: #fff;font-size: 12px;">2019- All Rights Reserved</p>
</div>
</div>
</div>
<div class="col-md-2" style="border-left: 1px solid #fff" ></div>
</div>
</header>
</div>
</header>
</body>
</html>

Related

Why is there a line between my linked images

There is a thin horizontal line between my linked images, I'm not sure what could be causing this or how to fix it. Any ideas?
.hvr-bounce-to-right {
display: inline-block;
vertical-align: middle;
-webkit-transform: perspective(1px) translateZ(0);
transform: perspective(1px) translateZ(0);
box-shadow: 0 0 1px transparent;
position: relative;
-webkit-transition-property: color;
transition-property: color;
-webkit-transition-duration: 0.5s;
transition-duration: 0.5s;
margin: 20px;
}
.cowalign {
text-align: center;
}
.cowalign img {
vertical-align: middle;
width: 350px;
}
.imgDescription {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 286px;
color: #fff;
visibility: hidden;
opacity: 0;
z-index: 1;
text-align: center;
/*remove comment if you want a gradual transition between states
-webkit-transition: visibility opacity 0.2s;
*/
}
.bgcolor {
max-width: 1300px;
background-color: #E5E5E5;
margin: auto;
}
.container {
background-color: #ffffff;
margin-right: auto;
margin-left: auto;
padding-right: 3%;
padding-left: 3%;
padding-bottom: 50px;
}
.logowordmark img {
float: left;
padding-left: 40px;
padding-top: 40px;
}
#navigation {
float: right;
padding-right: 40px;
padding-top: 40px
}
#navigation li {
display: inline-block;
vertical-align: middle;
margin-left: 20px;
text-transform: uppercase;
font-family: "mr-eaves-modern", sans-serif;
font-size: 12px;
font-weight: 100;
letter-spacing: normal;
color: #999999;
}
.heading {
clear: both;
margin: auto;
max-width: 750px;
padding-top: 50px;
margin-bottom: 50px;
padding-right: 20px;
padding-left: 20px;
}
#ourwork {
text-transform: uppercase;
font-weight: bold;
letter-spacing: 2px;
margin: auto;
font-size: 40px;
line-height: 40px;
}
.titlework {
font-size: 25px;
letter-spacing: 2px;
}
.descriptionwork {
font-size: 12px;
letter-spacing: 3px;
color: #21A4B9;
}
#ourwork span {
color: #21A4B9;
}
#ourworksubtext {
color: #999999;
}
.hvr-bounce-to-right:hover .imgDescription {
visibility: visible;
opacity: 1;
transition-delay: 0.2s;
}
.hvr-bounce-to-right:before {
content: "";
position: absolute;
z-index: 1;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #2D2D2D;
-webkit-transform: scaleX(0);
transform: scaleX(0);
-webkit-transform-origin: 0 50%;
transform-origin: 0 50%;
-webkit-transition-property: transform;
transition-property: transform;
-webkit-transition-duration: 0.5s;
transition-duration: 0.5s;
-webkit-transition-timing-function: ease-out;
transition-timing-function: ease-out;
opacity: 0.95;
}
.hvr-bounce-to-right:hover,
.hvr-bounce-to-right:focus,
.hvr-bounce-to-right:active {
color: white;
}
.hvr-bounce-to-right:hover:before,
.hvr-bounce-to-right:focus:before,
.hvr-bounce-to-right:active:before {
-webkit-transform: scaleX(1);
transform: scaleX(1);
-webkit-transition-timing-function: cubic-bezier(0.52, 1.64, 0.37, 0.66);
transition-timing-function: cubic-bezier(0.52, 1.64, 0.37, 0.66);
}
<div class="cowalign">
<a href="#">
<div class="hvr-bounce-to-right">
<div class="imgWrap">
<div class="imgDescription"><span class="titlework">Deadeye BBQ</span>
<br>
<span class="descriptionwork">Website/Mobile/Poster Design</span>
</div>
<img src="images/001-MacBook-Silverlarge.jpg" alt="cow">
</div>
</div>
</a>
<a href="#">
<div class="hvr-bounce-to-right">
<div class="imgWrap">
<div class="imgDescription"><span class="titlework">Jellyfish Evening</span>
<br>
<span class="descriptionwork"> Poster Design</span>
</div>
<img src="images/jellyfishevening.jpg" alt="cow">
</div>
</div>
</a>
<div class="cowalign">
<div class="hvr-bounce-to-right">
<div class="imgWrap">
<div class="imgDescription"><span class="titlework">Aerial Aid</span>
<br>
<span class="descriptionwork"> Logo Design</span>
</div>
<img src="images/aalogowork.jpg" alt="cow">
</div>
</div>
<div class="hvr-bounce-to-right">
<div class="imgWrap">
<div class="imgDescription"><span class="titlework">Dead, Dumb Fish</span>
<br>
<span class="descriptionwork">Poster Design</span>
</div>
<img src="images/fishwork.jpg" alt="cow">
</div>
</div>
</div>
</div>
</div>
It's because you haven't taken away the styling for the <a>wrapping the elements. Hence the default underline for the <a>is showing. The <a> directly after <div class="cowalign">
Add something like .cowalign a { text-decoration: none; } in the CSS
.cowalign a {
text-decoration: none;
}

Video loop 100% browser height & width

I'm trying to insert a video loop that displays at a responsive 100% height & width as the browser window is resized to fit .stage-0. Currently the video does not fit 100% height & width and #overlay is moved over to the right rather than sitting center? Any help as to how to create this effect would be greatly appreciated :-)
* {
margin: 0;
padding: 0;
list-style: none;
text-decoration: none;
font-size: 1em;
font-family: Helvetica Neue, Helvetica, Arial, Sans-serif;
}
html,
body {
height: 100%;
}
a {
background: transparent;
border: none;
letter-spacing: 0.15em;
text-transform: uppercase;
transition: .3s color;
transition: .3s height;
}
header {
position: fixed;
height: 60px;
width: 100%;
}
.header-wrapper {
width: 100%;
height: 100%;
background: transparent;
}
.header-bg,
.header-content {
position: fixed;
top: 0;
left: 0;
width: 100%;
text-align: center;
}
.header-bg {
color: gray;
background: white;
border-bottom: 1px solid black;
transition: .3s height;
height: 0;
}
.header-content {
margin-left: auto;
margin-right: auto;
transition: .3s color;
color: white;
background: transparent;
height: 60px;
transition: .3s height;
overflow: hidden;
list-style: none;
}
ul {
width: 100%;
text-align:center;
}
li {
padding-top: 15px;
display: inline-block;
*display: inline;
/*IE7*/
*zoom: 1;
/*IE7*/
margin-right: 50px;
}
.navBarLinks {
margin-left: auto;
margin-right: auto;
color: inherit;
cursor: pointer;
font-size: .8em;
letter-spacing: 0.05em;
transition: .3s color;
padding-top: 15px;
line-height: 31px;
}
.instagram {
margin-left: auto;
margin-right: auto;
float: left;
padding-left: 2%;
}
.home {
left: 50%;
position: absolute;
transform: translate(-50%);
}
.insticon {
margin-left: auto;
margin-right: auto;
float: right;
width: 25px;
height: 25px;
padding: 15px;
cursor: pointer;
fill: white;
font-size: .8em;
letter-spacing: 0.05em;
padding: .05px 10px;
}
#media only screen and (max-width: 583px) {
.find {
display: none;
}
}
.hamburger {
margin-left: auto;
margin-right: auto;
float: right;
padding-right: 3%;
}
#toggle-menu {
float:right;
display: block;
width: 15px;
height: 15px;
}
.header-wrapper #toggle-menu span {
width: 15px;
height: 3px;
position: absolute;
-webkit-transition: -webkit-transform 0.2s ease-in-out, top 0.2s ease-in-out 0.2s, opacity 0.2s ease-in-out 0.2s;
-moz-transition: -moz-transform 0.2s ease-in-out, top 0.2s ease-in-out 0.2s, opacity 0.2s ease-in-out 0.2s;
transition: transform 0.2s ease-in-out, top 0.2s ease-in-out 0.2s, opacity 0.2s ease-in-out 0.2s;
-webkit-transform-origin: center;
-moz-transform-origin: center;
transform-origin: center;
background: #fff;
}
}
#toggle-menu span.top {
top: 0px;
}
#toggle-menu span.middle {
top: 6px;
}
#toggle-menu span.bottom {
top: 12px;
}
content {
height: 2000px;
background: orange;
}
.stage {
color: #fff;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
height: 100vh;
background: white;
border-bottom: 1px solid black;
font-size: 48px;
height: 200px;
width: 100%;
}
.stage-0 {
display: flex;
background: grey;
background-attachment: fixed;
background-size: cover;
width: 100%;
height: 100%;
}
#overlay {
margin-left: auto;
margin-right: auto;
position: absolute;
top: 50%;
color: #FFF;
text-align: center;
font-size: 20px;
width: 100%;
}
.video {
position: fixed;
top: 50%;
left: 50%;
min-width: 100%;
min-height: 100%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
z-index: -999;
overflow: hidden;
}
/*promo video scroll*/
.arrow-bounce {
padding: 5%;
color: white;
left: 50%;
font-size: 26px;
cursor: pointer;
position: absolute;
transform: translate(-50%);
-webkit-transition: -webkit-transform 0.6s ease;
-moz-transition: -moz-transform 0.6s ease;
transition: transform 0.6s ease;
-webkit-animation: arrow 1s infinite;
-moz-animation: arrow 1s infinite;
-o-animation: arrow 1s infinite;
animation: arrow 1s infinite;
animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
}
#-webkit-keyframes arrow {
0% {
bottom: -13px;
}
50% {
bottom: -8px;
}
100% {
bottom: -13px;
}
}
#-moz-keyframes arrow {
0% {
bottom: -13px;
}
50% {
bottom: -8px;
}
100% {
bottom: -13px;
}
}
#keyframes arrow {
0% {
bottom: -13px;
}
50% {
bottom: -8px;
}
100% {
bottom: -13px;
}
}
<header>
<div class="header-wrapper">
<div class="header-bg"></div>
<div class="header-content">
<ul>
<li class="instagram">
Find me on
<a href="" class="navBarLinks in">
<svg class="insticon" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 155.2 144" style="enable-background:new 0 0 155.2 144;" xml:space="preserve">
<style type="text/css">
.st0 {}
</style>
<path class="st0" d="M50.1,121.7H28.8V53h21.4V121.7z M39.4,43.6c-6.8,0-12.4-5.6-12.4-12.4s5.5-12.4,12.4-12.4
c6.8,0,12.4,5.5,12.4,12.4C51.8,38,46.3,43.6,39.4,43.6z M130.1,121.7h-21.3V88.3c0-8-0.1-18.2-11.1-18.2
c-11.1,0-12.8,8.7-12.8,17.6v34H63.5V53H84v9.4h0.3c2.8-5.4,9.8-11.1,20.2-11.1c21.6,0,25.6,14.2,25.6,32.7
C130.1,84,130.1,121.7,130.1,121.7z" />
</svg>
</a>
</li>
<li class="home">Logo
</li>
<li class="hamburger">
<a href="" id="toggle-menu" class="navBarLinks">
<span id="top" class="burger"></span>
<span id="middle" class="burger"></span>
<span id="bottom" class="burger"></span>
</a>
</li>
</ul>
</div>
</div>
</header>
<content>
<div class="stage stage-0">
<div id="overlay">Overlay Placeholder! </div>
<div id="arrow">
<span class="arrow-bounce"><svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns= "http://www.w3.org/2000/svg">
<path d="M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z"/>
<path d="M0-.75h24v24H0z" fill="none"/>
</svg>
</span>
</div>
<video class="media-player" loop autoplay src="http://ak9.picdn.net/shutterstock/videos/6236564/preview/stock-footage-cybernetic-brain-zooming-through-eye.mp4">
</video>
</div>
<div class="stage stage-2">3</div>
<div class="stage stage-4">5</div>
<div class="stage stage-6">7</div>
<div class="stage stage-8">9</div>
<div class="stage stage-10">11</div>
<div class="stage stage-12">13</div>
<div class="stage stage-14">15</div>
<div class="stage stage-16">17</div>
<div class="stage stage-18">19</div>
<div class="stage stage-20">21</div>
<div class="stage stage-22">23</div>
</content>
Add the following code in your video tag:
style="width: 100%;height: 1500px;object-fit: cover;"
That should make it work :).

Trying to get Nav menu and logo to align within the grid

I am working on a responsive Nav menu for a website. I changed the header image into an image slider however now on the index.html page the nav menu is no longer aligned to the websites grid.
In the 'about', 'services' and contact pages the menu is positioned perfectly.
In the index.html page I have css code to position the navbar and logo position:absolute; but the rest of navs on the other page are position relative.
I want all the nav menus on each page to align the same so there is no obvious difference when the user changes pages. It may not be obvious on small screens but when you compare the index and about pages on a mobile device it is obvious the nav is not in the correct grid.
Can someone point me in the right direction?
Here is a link to the live site
http://shaneogrady.me/navtest/
HTML
<!DOCTYPE html>
<html>
<head>
<title> HELLO </title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content=""><script> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<script src="js/jquery-1.11.1.min.js"></script>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,800,700,600' rel='stylesheet' type='text/css'>
<link href="css/animate.css" rel="stylesheet" type="text/css" media="all">
<script src="js/wow.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script>
new WOW().init();
</script>
<script type="text/javascript" src="js/move-top.js"></script>
<script type="text/javascript" src="js/easing.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".scroll").click(function(event) {
event.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top},900);
});
});
</script>
</head>
<body>
<div id="home" class="banner a-banner">
<div class="container" style=" position: relative; z-index: 5; top: 0%; left: 5%;">
<div class="head-logo">
<img src="images/logo.png" alt="" />
</div>
<div class="top-nav">
<span class="menu"><img src="images/menu.png" alt=""></span>
<ul class="nav1">
<li class="hvr-sweep-to-bottom">Contact<i><img src="images/nav-but5.png" alt=""/></i></li>
<li class="hvr-sweep-to-bottom">Services<i><img src="images/nav-but3.png" alt=""/></i></li>
<li class="hvr-sweep-to-bottom">About<i><img src="images/nav-but2.png" alt=""/></i></li>
<li class="hvr-sweep-to-bottom active">Home<i><img src="images/nav-but1.png" alt=""/></i></li>
<div class="clearfix"></div>
</ul>
<script>
$( "span.menu" ).click(function() {
$( "ul.nav1" ).slideToggle( 300, function() {});
});
</script>
</div>
</div>
<div class="carousel fade-carousel slide" data-ride="carousel" data-interval="4000" id="bs-carousel">
<ol class="carousel-indicators">
<li data-target="#bs-carousel" data-slide-to="0" class="active"></li>
<li data-target="#bs-carousel" data-slide-to="1"></li>
<li data-target="#bs-carousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="item slides active">
<div class="slide-1">
<div class="overlay"></div>
</div>
<div class="hero">
<hgroup>
<h1>Batman</h1>
<h3>Batman</h3>
</hgroup>
<div class="see-button">
<a class="btn btn-primary btn-lg see-button hvr-shutter-out-horizontal" href="about.html" role="button">See More</a>
</div>
</div>
</div>
<div class="item slides">
<div class="slide-2">
<div class="overlay"></div>
</div>
<div class="hero">
<hgroup>
<h1>Superman</h1>
<h3>Superman</h3>
</hgroup>
<div class="see-button">
<a class="btn btn-primary btn-lg see-button hvr-shutter-out-horizontal" href="about.html" role="button">See More</a>
</div>
</div>
</div>
<div class="item slides">
<div class="slide-3">
<div class="overlay"></div>
</div>
<div class="hero">
<hgroup>
<h1>Spiderman</h1>
<h3>Spiderman</h3>
</hgroup>
<div class="see-button">
<a class="btn btn-primary btn-lg see-button hvr-shutter-out-horizontal" href="services.html" role="button">See More</a>
</div>
</div>
</div>
</div>
</body>
</html>
CSS
body{
background:#fff;
font-family: 'Open Sans', sans-serif;
}
body a {
transition: 0.5s all;
-webkit-transition: 0.5s all;
-o-transition: 0.5s all;
-moz-transition: 0.5s all;
-ms-transition: 0.5s all;
}
.banner{
background: url(../images/banner2.jpg) no-repeat 0px 0px #eeece9;
min-height: 855px;
background-size: cover;
position: relative;
}
.head-logo{
float: left;
}
.head-logo a {
display: block;
margin-top: 3.5em;
}
.top-nav{
float: right;
width: 70%;
}
.top-nav ul{
padding:0;
margin:0;
}
.top-nav ul li {
display: inline-block;
width: 20%;
margin-right: .4em;
display:block;
float: right;
line-height:38px;
margin:0;
padding:0;
position:relative;
}
.top-nav ul li.active{
background: #5abc5e;
}
.top-nav ul li a{
color: #FFF;
font-size: 18px;
margin-right: .4em;
float: left;
padding: 3em 0em 3em 1.4em;
text-align: center;
width: 79%;
}
.top-nav ul li a i{
display: block;
margin-top: 1em;
color: #FFF;
font-size: 11px;
font-style: italic;
}
.top-nav ul li a:hover{
text-decoration:none;
}
/********************************/
/* Fade Bs-carousel */
/********************************/
.fade-carousel {
position: relative;
height: 100vh;
}
.fade-carousel .carousel-inner .item {
height: 100vh;
}
.fade-carousel .carousel-indicators > li {
margin: 0 2px;
background-color: #f39c12;
border-color: #f39c12;
opacity: .7;
}
.fade-carousel .carousel-indicators > li.active {
width: 10px;
height: 10px;
opacity: 1;
}
/********************************/
/* Hero Headers */
/********************************/
.hero {
position: absolute;
top: 50%;
left: 50%;
z-index: 3;
color: #fff;
text-align: center;
text-transform: uppercase;
text-shadow: 1px 1px 0 rgba(0,0,0,.75);
-webkit-transform: translate3d(-50%,-50%,0);
-moz-transform: translate3d(-50%,-50%,0);
-ms-transform: translate3d(-50%,-50%,0);
-o-transform: translate3d(-50%,-50%,0);
transform: translate3d(-50%,-50%,0);
}
.hero h1 {
font-size: 6em;
font-weight: bold;
margin: 0;
padding: 0;
}
.fade-carousel .carousel-inner .item .hero {
opacity: 0;
-webkit-transition: 2s all ease-in-out .1s;
-moz-transition: 2s all ease-in-out .1s;
-ms-transition: 2s all ease-in-out .1s;
-o-transition: 2s all ease-in-out .1s;
transition: 2s all ease-in-out .1s;
}
.fade-carousel .carousel-inner .item.active .hero {
opacity: 1;
-webkit-transition: 2s all ease-in-out .1s;
-moz-transition: 2s all ease-in-out .1s;
-ms-transition: 2s all ease-in-out .1s;
-o-transition: 2s all ease-in-out .1s;
transition: 2s all ease-in-out .1s;
}
/********************************/
/* Overlay */
/********************************/
.overlay {
position: absolute;
width: 100%;
height: 100%;
z-index: 2;
background-color: #080d15;
opacity: .3;
}
/********************************/
/* Slides backgrounds */
/********************************/
.fade-carousel .slides .slide-1,
.fade-carousel .slides .slide-2,
.fade-carousel .slides .slide-3 {
height: 100vh;
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
}
.fade-carousel .slides .slide-1 {
background-image: url(../images/banner2.jpg);
}
.fade-carousel .slides .slide-2 {
background-image: url(../images/squad.jpg);
}
.fade-carousel .slides .slide-3 {
background-image: url(../images/roadside.jpg);
}
/********************************/
/* Media Queries */
/********************************/
#media screen and (min-width: 980px){
.hero { width: 980px; }
}
#media screen and (max-width: 640px){
.hero h1 { font-size: 4em; }
}
/* Sweep To Bottom */
.hvr-sweep-to-bottom {
display: inline-block;
vertical-align: middle;
-webkit-transform: translateZ(0);
-o-transform: translateZ(0);
-moz-transform: translateZ(0);
-ms-transform: translateZ(0);
transform: translateZ(0);
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
-webkit-backface-visibility: hidden;
-o-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
backface-visibility: hidden;
-moz-osx-font-smoothing: grayscale;
-ms-osx-font-smoothing: grayscale;
-o-osx-font-smoothing: grayscale;
position: relative;
-webkit-transition-property: color;
-o-transition-property: color;
-moz-transition-property: color;
-ms-transition-property: color;
transition-property: color;
-webkit-transition-duration: 0.3s;
-o-transition-duration: 0.3s;
-moz-transition-duration: 0.3s;
-ms-transition-duration: 0.3s;
transition-duration: 0.3s;
}
.hvr-sweep-to-bottom:before {
content: "";
position: absolute;
z-index: -1;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #5abc5e;
-webkit-transform: scaleY(0);
-o-transform: scaleY(0);
-moz-transform: scaleY(0);
-ms-transform: scaleY(0);
transform: scaleY(0);
-webkit-transform-origin: 50% 0;
-o-transform-origin: 50% 0;
-moz-transform-origin: 50% 0;
-ms-transform-origin: 50% 0;
transform-origin: 50% 0;
-webkit-transition-property: transform;
-o-transition-property: transform;
-moz-transition-property: transform;
-ms-transition-property: transform;
transition-property: transform;
-webkit-transition-duration: 0.3s;
-o-transition-duration: 0.3s;
-moz-transition-duration: 0.3s;
-ms-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-timing-function: ease-out;
-o-transition-timing-function: ease-out;
-moz-transition-timing-function: ease-out;
-ms-transition-timing-function: ease-out;
transition-timing-function: ease-out;
}
.hvr-sweep-to-bottom:hover, .hvr-sweep-to-bottom:focus, .hvr-sweep-to-bottom:active {
color: white;
}
.hvr-sweep-to-bottom:hover:before, .hvr-sweep-to-bottom:focus:before, .hvr-sweep-to-bottom:active:before {
-webkit-transform: scaleY(1);
transform: scaleY(1);
}
.banner-bottom-grids{
margin: 5em 0;
}
.banner-bottom-left{
padding: 0;
padding-left: 0 !important;
padding-right: 0 !important;
margin: 0;
}
.banner-bottom-left h3{
color: #000;
font-size: 37px;
margin: 0;
line-height: 1.2em;
font-weight: 300;
}
.banner-bottom-left h5{
color: #969696;
font-size: 14px;
margin: 1em 0;
line-height: 1.8em;
}
.banner-bottom-left h5 span{
display:block;
}
.banner-bottom-left p{
color: #333333;
font-size: 14px;
margin: 0;
line-height: 1.8em;
font-weight: 600;
}
.banner-bottom-right img{
width:100%;
}
.see-button{
margin-top: 1em;
}
.see-button a{
font-size: 14px;
text-transform: uppercase;
text-decoration: none;
padding: 1em 4em;
outline: none;
background: #393939;
border: none !important;
border-radius:0;
}
.jumbotron.banner-bottom-left {
background: none;
}
/*------------------ Slider Part starts Here----------*/
#slider2,
#slider3 {
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
margin: 0 auto;
}
.rslides_tabs {
list-style: none;
padding: 0;
background: rgba(0,0,0,.25);
box-shadow: 0 0 1px rgba(255,255,255,.3), inset 0 0 5px rgba(0,0,0,1.0);
-moz-box-shadow: 0 0 1px rgba(255,255,255,.3), inset 0 0 5px rgba(0,0,0,1.0);
-webkit-box-shadow: 0 0 1px rgba(255,255,255,.3), inset 0 0 5px rgba(0,0,0,1.0);
font-size: 18px;
list-style: none;
margin: 0 auto 50px;
max-width: 540px;
padding: 10px 0;
text-align: center;
width: 100%;
}
.rslides_tabs li {
display: inline;
float: none;
margin-right: 1px;
}
.rslides_tabs a {
width: auto;
line-height: 20px;
padding: 9px 20px;
height: auto;
background: transparent;
display: inline;
}
.rslides_tabs li:first-child {
margin-left: 0;
}
.rslides_tabs .rslides_here a {
background: rgba(255,255,255,.1);
color: #fff;
font-weight: bold;
}
.events {
list-style: none;
}
.callbacks_container {
position: relative;
float: left;
width: 100%;
}
.callbacks {
position: relative;
list-style: none;
overflow: hidden;
width: 100%;
padding: 0;
margin: 0;
}
.callbacks li {
position: absolute;
width: 100%;
left: 0;
top: 0;
}
.callbacks img {
position: relative;
z-index: 1;
height: auto;
border: 0;
}
.callbacks .caption {
display: block;
position: absolute;
z-index: 2;
font-size: 20px;
text-shadow: none;
color: #fff;
left: 0;
right: 0;
padding: 10px 20px;
margin: 0;
max-width: none;
top: 10%;
text-align: center;
}
.callbacks_nav {
position: absolute;
-webkit-tap-highlight-color: rgba(0,0,0,0);
top: 52%;
left: 0;
opacity: 0.7;
z-index: 3;
text-indent: -9999px;
overflow: hidden;
text-decoration: none;
height: 61px;
width: 55px;
background: transparent url("../images/themes.png") no-repeat left top;
margin-top: -65px;
}
.callbacks_nav:active {
opacity: 1.0;
}
.callbacks_nav.next {
left: auto;
background-position: right top;
right: 0;
}
#slider3-pager a {
display: inline-block;
}
#slider3-pager span{
float: left;
}
#slider3-pager span{
width:100px;
height:15px;
background:#fff;
display:inline-block;
border-radius:30em;
opacity:0.6;
}
#slider3-pager .rslides_here a {
background: #FFF;
border-radius:30em;
opacity:1;
}
#slider3-pager a {
padding: 0;
}
#slider3-pager li{
display:inline-block;
}
.rslides {
position: relative;
list-style: none;
overflow: hidden;
width: 100%;
padding: 0;
margin: 0;
}
.rslides li {
-webkit-backface-visibility: hidden;
position: absolute;
display: none;
width: 100%;
left: 0;
top: 0;
}
.rslides li{
position: relative;
display: block;
float: left;
}
.rslides img {
height: auto;
border: 0;
width:100%;
}
.callbacks_tabs{
list-style: none;
position: absolute;
top: 78%;
z-index: 999;
left: 45%;
padding: 0;
margin: 0;
}
.slider-top{
text-align: center;
padding:10em 0;
}
.slider-top h1{
font-weight:700;
font-size:48px;
color:#010101;
}
.slider-top p{
font-weight:400;
font-size:20px;
padding:1em 7em;
color:#010101;
}
.slider-top ul.social-slide{
display:inline-flex;
margin: 0px;
padding: 0px;
}
You might want to try rebuilding your css from scratch instruction by instruction and see what is changing something. If a change doesn't apply, try adding !important at the end (like so :{ width : 30% !important;}), sometimes Bootstrap is a bit possessive.
Maybe throwing a position : absolute ; right :0; top:0; in the .top-nav and building from there would help do the trick.
An element with position: absolute is positioned relative to the
nearest positioned ancestor (instead of positioned relative to the
viewport, like fixed)
position: absolute allows an element to be positioned with respect
to a containing block using left, right, top or bottom (the containing
block is the nearest ancestor node with a position of relative,
absolute or fixed).
To fix it just add left: 0 and right: 0 to .container this will make the div stretch to document width.
Here a minimal snippet example to illustrate (without using left, right):
div.relative {
position: relative;
height: 200px;
border: 3px solid #8AC007;
}
div.absolute {
position: absolute;
height: 100px;
border: 3px solid blue;
display: block;
}
<div class="relative">This
<div>element has position: relative;
<div class="absolute">This
<div>element has position: absolute;</div>
</div>
Now with left: 0, right: 0
div.relative {
position: relative;
height: 200px;
border: 3px solid #8AC007;
}
div.absolute {
position: absolute;
height: 100px;
border: 3px solid blue;
display: block;
left: 0;
right: 0;
}
<div class="relative">This
<div>element has position: relative;
<div class="absolute">This
<div>element has position: absolute;</div>
</div>
Check this out to full information

Nav bar wont lay over top slider

I'm new to programming. I'm using bootstrap and I'm trying to get the Nav menu to overlay over the slider at the top of the website.
Can someone tell me what I'm doing wrong or point me in the right direction?
Here is a link to the site on codepen
http://codepen.io/anon/pen/MwLBKv
HTML
<!-- bootstarp-css -->
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
<!-- FontAwesome
-->
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<!--// bootstarp-css -->
<!-- css -->
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<!--// css -->
<script src="js/jquery-1.11.1.min.js"></script>
<!--fonts-->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,800,700,600' rel='stylesheet' type='text/css'>
<!--/fonts-->
<link href="css/animate.css" rel="stylesheet" type="text/css" media="all">
<script src="js/wow.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script>
new WOW().init();
</script>
<!--start-smoth-scrolling-->
<script type="text/javascript" src="js/move-top.js"></script>
<script type="text/javascript" src="js/easing.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".scroll").click(function(event){
event.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top},900);
});
});
</script>
<!--start-smoth-scrolling-->
</head>
<body>
<!-- banner -->
<div id="home" class="banner a-banner">
<!-- container -->
<div class="container">
<div class="head-logo">
<img src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQ6FfLzPB1MpLiIxrIapoSbEf0PFvTjQ3TbcLrQCijCN68LfWZi" alt="" />
</div>
<div class="top-nav">
<ul class="nav1">
<li class="hvr-sweep-to-bottom">Contact<i><img src="http://demo.chimerathemes.com/wp-content/themes/apppress/images/icons/included/color.png" alt=""/></i></li>
<li class="hvr-sweep-to-bottom">Services<i><img src="http://demo.chimerathemes.com/wp-content/themes/apppress/images/icons/included/color.png" alt=""/></i></li>
<li class="hvr-sweep-to-bottom">About<i><img src="http://demo.chimerathemes.com/wp-content/themes/apppress/images/icons/included/color.png" alt=""/></i></li>
<li class="hvr-sweep-to-bottom active">Home<i><img src="http://demo.chimerathemes.com/wp-content/themes/apppress/images/icons/included/color.png" alt=""/></i></li>
<div class="clearfix"> </div>
</ul>
<!-- script-for-menu -->
<script>
$( "span.menu" ).click(function() {
$( "ul.nav1" ).slideToggle( 300, function() {
// Animation complete.
});
});
</script>
<!-- /script-for-menu -->
</div>
</div>
<!-- car -->
<div class="carousel fade-carousel slide" data-ride="carousel" data-interval="4000" id="bs-carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#bs-carousel" data-slide-to="0" class="active"></li>
<li data-target="#bs-carousel" data-slide-to="1"></li>
<li data-target="#bs-carousel" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item slides active">
<div class="slide-1">
<div class="overlay"></div>
</div>
<div class="hero">
<hgroup>
<h1>Recovery</h1>
<h3>Get start your next awesome project</h3>
</hgroup>
<div class="see-button">
<a class="btn btn-primary btn-lg see-button hvr-shutter-out-horizontal" href="about.html" role="button">See More</a>
</div>
</div>
</div>
<div class="item slides">
<div class="slide-2">
<div class="overlay"></div>
</div>
<div class="hero">
<hgroup>
<h1>Equiped for any Job</h1>
<h3>Get start your next awesome project</h3>
</hgroup>
<div class="see-button">
<a class="btn btn-primary btn-lg see-button hvr-shutter-out-horizontal" href="about.html" role="button">See More</a>
</div> </div>
</div>
<div class="item slides">
<div class="slide-3">
<div class="overlay"></div>
</div>
<div class="hero">
<hgroup>
<h1>Batman</h1>
<h3>Get start your next awesome project</h3>
</hgroup>
<div class="see-button">
<a class="btn btn-primary btn-lg see-button hvr-shutter-out-horizontal" href="about.html" role="button">See More</a>
</div> </div>
</div>
</div>
<!-- car -->
</div>
<!-- //container -->
</div>
CSS
body{
background:#fff;
font-family: 'Open Sans', sans-serif;
}
body a {
transition: 0.5s all;
-webkit-transition: 0.5s all;
-o-transition: 0.5s all;
-moz-transition: 0.5s all;
-ms-transition: 0.5s all;
}
.banner{
background: url(../images/banner2.jpg) no-repeat 0px 0px #eeece9;
min-height: 855px;
background-size: cover;
position: relative;
}
.head-logo{
float: left;
}
.head-logo a {
display: block;
margin-top: 3.5em;
}
.top-nav{
float: right;
width: 70%;
}
.top-nav ul{
padding:0;
margin:0;
}
.top-nav ul li {
display: inline-block;
width: 20%;
margin-right: .4em;
display:block;
float: right;
line-height:38px;
margin:0;
padding:0;
position:relative;
}
.top-nav ul li.active{
background: #5abc5e;
}
.top-nav ul li a{
color: #FFF;
font-size: 18px;
margin-right: .4em;
float: left;
padding: 3em 0em 3em 1.4em;
text-align: center;
width: 79%;
}
.top-nav ul li a i{
display: block;
margin-top: 1em;
color: #FFF;
font-size: 11px;
font-style: italic;
}
.top-nav ul li a:hover{
text-decoration:none;
}
/********************************/
/* Fade Bs-carousel */
/********************************/
.fade-carousel {
position: relative;
height: 100vh;
}
.fade-carousel .carousel-inner .item {
height: 100vh;
}
.fade-carousel .carousel-indicators > li {
margin: 0 2px;
background-color: #f39c12;
border-color: #f39c12;
opacity: .7;
}
.fade-carousel .carousel-indicators > li.active {
width: 10px;
height: 10px;
opacity: 1;
}
/********************************/
/* Hero Headers */
/********************************/
.hero {
position: absolute;
top: 50%;
left: 50%;
z-index: 3;
color: #fff;
text-align: center;
text-transform: uppercase;
text-shadow: 1px 1px 0 rgba(0,0,0,.75);
-webkit-transform: translate3d(-50%,-50%,0);
-moz-transform: translate3d(-50%,-50%,0);
-ms-transform: translate3d(-50%,-50%,0);
-o-transform: translate3d(-50%,-50%,0);
transform: translate3d(-50%,-50%,0);
}
.hero h1 {
font-size: 6em;
font-weight: bold;
margin: 0;
padding: 0;
}
.fade-carousel .carousel-inner .item .hero {
opacity: 0;
-webkit-transition: 2s all ease-in-out .1s;
-moz-transition: 2s all ease-in-out .1s;
-ms-transition: 2s all ease-in-out .1s;
-o-transition: 2s all ease-in-out .1s;
transition: 2s all ease-in-out .1s;
}
.fade-carousel .carousel-inner .item.active .hero {
opacity: 1;
-webkit-transition: 2s all ease-in-out .1s;
-moz-transition: 2s all ease-in-out .1s;
-ms-transition: 2s all ease-in-out .1s;
-o-transition: 2s all ease-in-out .1s;
transition: 2s all ease-in-out .1s;
}
/********************************/
/* Overlay */
/********************************/
.overlay {
position: absolute;
width: 100%;
height: 100%;
z-index: 2;
background-color: #080d15;
opacity: .3;
}
/********************************/
/* Slides backgrounds */
/********************************/
.fade-carousel .slides .slide-1,
.fade-carousel .slides .slide-2,
.fade-carousel .slides .slide-3 {
height: 100vh;
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
}
.fade-carousel .slides .slide-1 {
background-image: url(../images/banner2.jpg);
}
.fade-carousel .slides .slide-2 {
background-image: url(../images/squad.jpg);
}
.fade-carousel .slides .slide-3 {
background-image: url(../images/roadside.jpg);
}
/********************************/
/* Media Queries */
/********************************/
#media screen and (min-width: 980px){
.hero { width: 980px; }
}
#media screen and (max-width: 640px){
.hero h1 { font-size: 4em; }
}
/* Sweep To Bottom */
.hvr-sweep-to-bottom {
display: inline-block;
vertical-align: middle;
-webkit-transform: translateZ(0);
-o-transform: translateZ(0);
-moz-transform: translateZ(0);
-ms-transform: translateZ(0);
transform: translateZ(0);
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
-webkit-backface-visibility: hidden;
-o-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
backface-visibility: hidden;
-moz-osx-font-smoothing: grayscale;
-ms-osx-font-smoothing: grayscale;
-o-osx-font-smoothing: grayscale;
position: relative;
-webkit-transition-property: color;
-o-transition-property: color;
-moz-transition-property: color;
-ms-transition-property: color;
transition-property: color;
-webkit-transition-duration: 0.3s;
-o-transition-duration: 0.3s;
-moz-transition-duration: 0.3s;
-ms-transition-duration: 0.3s;
transition-duration: 0.3s;
}
.hvr-sweep-to-bottom:before {
content: "";
position: absolute;
z-index: -1;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #5abc5e;
-webkit-transform: scaleY(0);
-o-transform: scaleY(0);
-moz-transform: scaleY(0);
-ms-transform: scaleY(0);
transform: scaleY(0);
-webkit-transform-origin: 50% 0;
-o-transform-origin: 50% 0;
-moz-transform-origin: 50% 0;
-ms-transform-origin: 50% 0;
transform-origin: 50% 0;
-webkit-transition-property: transform;
-o-transition-property: transform;
-moz-transition-property: transform;
-ms-transition-property: transform;
transition-property: transform;
-webkit-transition-duration: 0.3s;
-o-transition-duration: 0.3s;
-moz-transition-duration: 0.3s;
-ms-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-timing-function: ease-out;
-o-transition-timing-function: ease-out;
-moz-transition-timing-function: ease-out;
-ms-transition-timing-function: ease-out;
transition-timing-function: ease-out;
}
.hvr-sweep-to-bottom:hover, .hvr-sweep-to-bottom:focus, .hvr-sweep-to-bottom:active {
color: white;
}
.hvr-sweep-to-bottom:hover:before, .hvr-sweep-to-bottom:focus:before, .hvr-sweep-to-bottom:active:before {
-webkit-transform: scaleY(1);
transform: scaleY(1);
}
.banner-bottom-grids{
margin: 5em 0;
}
.banner-bottom-left{
padding: 0;
padding-left: 0 !important;
padding-right: 0 !important;
margin: 0;
}
.banner-bottom-left h3{
color: #000;
font-size: 37px;
margin: 0;
line-height: 1.2em;
font-weight: 300;
}
.banner-bottom-left h5{
color: #969696;
font-size: 14px;
margin: 1em 0;
line-height: 1.8em;
}
.banner-bottom-left h5 span{
display:block;
}
.banner-bottom-left p{
color: #333333;
font-size: 14px;
margin: 0;
line-height: 1.8em;
font-weight: 600;
}
.banner-bottom-right img{
width:100%;
}
.see-button{
margin-top: 1em;
}
.see-button a{
font-size: 14px;
text-transform: uppercase;
text-decoration: none;
padding: 1em 4em;
outline: none;
background: #393939;
border: none !important;
border-radius:0;
}
.jumbotron.banner-bottom-left {
background: none;
}
/*------------------ Slider Part starts Here----------*/
#slider2,
#slider3 {
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
margin: 0 auto;
}
.rslides_tabs {
list-style: none;
padding: 0;
background: rgba(0,0,0,.25);
box-shadow: 0 0 1px rgba(255,255,255,.3), inset 0 0 5px rgba(0,0,0,1.0);
-moz-box-shadow: 0 0 1px rgba(255,255,255,.3), inset 0 0 5px rgba(0,0,0,1.0);
-webkit-box-shadow: 0 0 1px rgba(255,255,255,.3), inset 0 0 5px rgba(0,0,0,1.0);
font-size: 18px;
list-style: none;
margin: 0 auto 50px;
max-width: 540px;
padding: 10px 0;
text-align: center;
width: 100%;
}
.rslides_tabs li {
display: inline;
float: none;
margin-right: 1px;
}
.rslides_tabs a {
width: auto;
line-height: 20px;
padding: 9px 20px;
height: auto;
background: transparent;
display: inline;
}
.rslides_tabs li:first-child {
margin-left: 0;
}
.rslides_tabs .rslides_here a {
background: rgba(255,255,255,.1);
color: #fff;
font-weight: bold;
}
.events {
list-style: none;
}
.callbacks_container {
position: relative;
float: left;
width: 100%;
}
.callbacks {
position: relative;
list-style: none;
overflow: hidden;
width: 100%;
padding: 0;
margin: 0;
}
.callbacks li {
position: absolute;
width: 100%;
left: 0;
top: 0;
}
.callbacks img {
position: relative;
z-index: 1;
height: auto;
border: 0;
}
.callbacks .caption {
display: block;
position: absolute;
z-index: 2;
font-size: 20px;
text-shadow: none;
color: #fff;
left: 0;
right: 0;
padding: 10px 20px;
margin: 0;
max-width: none;
top: 10%;
text-align: center;
}
.callbacks_nav {
position: absolute;
-webkit-tap-highlight-color: rgba(0,0,0,0);
top: 52%;
left: 0;
opacity: 0.7;
z-index: 3;
text-indent: -9999px;
overflow: hidden;
text-decoration: none;
height: 61px;
width: 55px;
background: transparent url("../images/themes.png") no-repeat left top;
margin-top: -65px;
}
.callbacks_nav:active {
opacity: 1.0;
}
.callbacks_nav.next {
left: auto;
background-position: right top;
right: 0;
}
#slider3-pager a {
display: inline-block;
}
#slider3-pager span{
float: left;
}
#slider3-pager span{
width:100px;
height:15px;
background:#fff;
display:inline-block;
border-radius:30em;
opacity:0.6;
}
#slider3-pager .rslides_here a {
background: #FFF;
border-radius:30em;
opacity:1;
}
#slider3-pager a {
padding: 0;
}
#slider3-pager li{
display:inline-block;
}
.rslides {
position: relative;
list-style: none;
overflow: hidden;
width: 100%;
padding: 0;
margin: 0;
}
.rslides li {
-webkit-backface-visibility: hidden;
position: absolute;
display: none;
width: 100%;
left: 0;
top: 0;
}
.rslides li{
position: relative;
display: block;
float: left;
}
.rslides img {
height: auto;
border: 0;
width:100%;
}
.callbacks_tabs{
list-style: none;
position: absolute;
top: 78%;
z-index: 999;
left: 45%;
padding: 0;
margin: 0;
}
.slider-top{
text-align: center;
padding:10em 0;
}
.slider-top h1{
font-weight:700;
font-size:48px;
color:#010101;
}
.slider-top p{
font-weight:400;
font-size:20px;
padding:1em 7em;
color:#010101;
}
.slider-top ul.social-slide{
display:inline-flex;
margin: 0px;
padding: 0px;
}
Apply position: absolute; and z-index: 5; to your nav .container. I would recommend you use the .container class on your page container and use some of bootstraps nav classes to build your nav bar.

Unpleasant small movement in overlapped expanding div

When you open it, click in the color aqua div, then make a hover in the first box and click where it says "CLICK ME". You'll see that when the appearing div reaches the border of the windows, there is a little movement in the top border, which is very annoying. I tried a lot of things but i wasn't able to remove it. Any ideas? Thanks in advance.
/* ////// INITIAL RESET AND CONFIGURATIONS ////// */
html {
margin: 0;
padding: 0;
}
body {
margin: 0;
padding: 0;
/* Hide the other pages */
}
body {
margin: 0;
padding: 0;
border: 0;
/*height: 100%; Also works 100vh (View percentage lenght) */
overflow: hidden;
}
ul {
list-style: none;
text-align: center;
}
a {
display: block;
border: none;
text-decoration: none;
color: black;
cursor: default;
}
/*================================== PAGE SLIDE TRANSITION ==================================*/
/* Basic Style/Positioning for all Pages */
.pages,
.page,
.page .backbutton,
.page .nextbutton {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.page .backbutton,
.page .nextbutton {
height: 10%;
background-color: red;
z-index: 1;
}
.page .backbutton {
top: 0%;
}
.page .nextbutton {
top: 90%;
background-color: aqua;
}
/* Pages */
#i2 {
top: 100%;
}
#i3 {
top: 200%;
}
/* Slide Effect */
.pages {
-webkit-transition: top 0.8s;
-moz-transition: top 0.8s;
-o-transition: top 0.8s;
-ms-transition: top 0.8s;
transition: top 0.8s;
}
#a1:target .pages {
top: 0%;
}
#a2:target .pages {
top: -100%;
}
#a3:target .pages {
top: -200%;
}
#i1 {
background-color: #fff;
}
#i2 {
background-color: #bbb;
}
#i3 {
background-color: #777;
}
/*================================== PAGE ONE ==================================*/
/* ////// ELEMENT'S POSITION ////// */
#i1 {
background-color: bisque;
/*position:relative; stacking context */
}
/* ////// HOVER ////// */
.menu li a:hover {
background: teal;
visibility: visible;
}
#i1 .menu li a:hover + .image {
top: 0;
}
#i1 .menu li a {
z-index: 3;
position: relative;
}
#i1 li .image {
position: absolute;
width: 17.5%;
padding: 0px;
border: 0px #999999 solid;
margin: 0px;
height: 100%;
transition: 0.8s;
top: -50%;
}
#i1 .image1 {
background-color: grey;
left: 10%;
}
#i1 .image2 {
background-color: #777777;
left: 27.5%;
}
#i1 .image3 {
background-color: #555555;
left: 45%;
}
#i1 .image4 {
background-color: #333333;
left: 62.5%;
}
/* ////// ICON ////// */
[data-icon]:before {
/* Allows to show the icons */
font-family: 'icomoon';
content: attr(data-icon);
speak: none;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
}
.icon:before {
/* Shows the icon */
float: left;
content: '\e60e';
font-family: 'icomoon';
speak: none;
color: red;
font-size: 50px;
}
#button_menu {
position: absolute;
display: none;
}
label {
position: absolute;
float: left;
top: 75%;
left: 3%;
border: 1px green solid;
}
#button_menu + label {
cursor: pointer;
}
/* ////// MENU OPTION's TRANSITIONS ////// */
.menu {
list-style: none;
box-sizing: border-box;
width: 70%;
padding: 0;
margin: 0;
margin-top: 80vh;
margin-left: 10%;
overflow: hidden;
border: 1px solid #FF0000;
}
li.option {
float: left;
display: inline-block;
box-sizing: border-box;
padding: 0px 55px 0px 55px;
width: 25%;
margin: 0;
margin-top: 20px;
background: yellow;
border: 1px solid #000;
opacity: 0;
transition: .5s;
}
#button_menu:checked ~ .menu a {
cursor: pointer;
}
#button_menu:checked ~ .menu .option {
margin-top: 0px;
opacity: 1;
}
li.option:first-child {
transition-delay: .6s;
}
li.option:nth-child(2) {
transition-delay: .4s;
}
li.option:nth-child(3) {
transition-delay: .2s;
}
li.option:last-child {
transition-delay: 0s;
}
#button_menu:checked ~ .menu li.option:first-child {
transition-delay: 0s;
}
#button_menu:checked ~ .menu li.option:nth-child(2) {
transition-delay: .2s;
}
#button_menu:checked ~ .menu li.option:nth-child(3) {
transition-delay: .4s;
}
#button_menu:checked ~ .menu li.option:last-child {
transition-delay: .6s;
}
/*================================== PAGE TWO ==================================*/
h1,
p {
text-align: center;
padding: 0;
opacity: 0;
transform: scale(10);
transition: all 0.3s ease-in-out 0.1s;
}
.overlay {
display: block;
100%;
width: 100%;
margin: 0;
padding: 0;
}
#ov .overlay_open {
position: absolute;
margin: 0;
height: 100%;
width: 100%;
visibility: hidden;
opacity: 0;
-webkit-transform: scale(0.9);
transform: scale(0.9|);
-webkit-transition: -webkit-transform 0.2s, opacity 0.2s, visibility 0s 0.2s;
transition: transform 0.2s, opacity 0.2s, visibility 0s 0.2s;
background-color: chocolate;
z-index: 2;
}
/* ////// CENTERING THE PICTURES //////*/
.container {
/*occupes all the screen and hide the divs bigger than it*/
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
overflow: hidden;
}
.center {
position: absolute;
left: 50%;
top: 50%;
}
/*div centers in the middle of its parent, with 0
height and with (just a dot)*/
.center-container {
position: absolute;
left: -2500px;
top: -2500px;
/*move it left and top to be centered exactly in the middle from the center doth*/
width: 5000px;
height: 5000px;
line-height: 5000px;
text-align: center;
/*centers horizontally the pictures*/
overflow: hidden;
}
.dyn-box {
display: inline-block;
vertical-align: middle;
line-height: 100%;
}
/*-----------------***-----------------*/
.box {
float: left;
width: 130px;
height: 130px;
margin: 10px;
border: 5px black solid;
overflow: hidden;
}
.b4 {
clear: both;
}
.picture {
position: absolute;
width: 130px;
height: 130px;
background-color: beige;
}
.mask {
position: absolute;
width: 130px;
height: 130px;
overflow: hidden;
background-color: coral;
opacity: 0;
transition: all 0.3s ease-in-out 0.1s;
}
.box .mask:hover {
opacity: 0.4;
}
.box .mask:hover h1 {
transform: scale(1);
opacity: 1;
}
.box .mask:hover p {
transform: scale(1);
opacity: 1;
transition-delay: .2s;
}
#ov:target .overlay_open {
visibility: visible;
opacity: 0.8;
-webkit-transform: scale(1);
transform: scale(1);
}
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="rock_page.css">
<link rel="stylesheet" type="text/css" href="icons_files/style.css">
<script type="text/javascript" src="jquery-1.11.2.js"></script>
<script type="text/javascript" src="main.js"></script>
<title>Rock n' Roll</title>
</head>
<body>
<div id="a1">
<div id="a2">
<div id="a3">
<div class="pages">
<!-- Second Page #a1 -->
<div id="i1" class="page">
<input type="checkbox" name="button_menu" id="button_menu" />
<label for="button_menu" class="icon"></label>
<!--This also works for the icon instead of the CSS code
<span aria-hidden="true" data-icon="" class="down-arrow">-->
<ul class="menu">
<li class="option">Link 1
<div class="image image1"></div>
</li>
<li class="option">Link 2
<div class="image image2"></div>
</li>
<li class="option">Link 3
<div class="image image3"></div>
</li>
<li class="option">Link 4
<div class="image image4"></div>
</li>
</ul>
</div>
<!-- Second Page #a2 -->
<div id="i2" class="page">
<div class="container">
<div class="center">
<div class="center-container">
<span class="dyn-box">
<div class="box b1">
<div class="picture"></div>
<div class="mask">
<h1>Text</h1>
<p>Lore ipsum facto lore impsum facto</p>
CLICK ME
</div>
</div>
<div class="box b2">
<div class="picture"></div>
<div class="mask">
<h1>Text</h1>
<p>Lore ipsum facto lore impsum facto</p>
</div>
</div>
<div class="box b3">
<div class="picture"></div>
<div class="mask">
<h1>Text</h1>
<p>Lore ipsum facto lore impsum facto</p>
</div>
</div>
<div class="box b4">
<div class="picture"></div>
<div class="mask">
<h1>Text</h1>
<p>Lore ipsum facto lore impsum facto</p>
</div>
</div>
<div class="box b5">
<div class="picture"></div>
<div class="mask">
<h1>Text</h1>
<p>Lore ipsum facto lore impsum facto</p>
</div>
</div>
<div class="box b6">
<div class="picture"></div>
<div class="mask">
<h1>Text</h1>
<p>Lore ipsum facto lore impsum facto</p>
</div>
</div>
</span>
</div>
</div>
</div>
<div id="ov" class="overlay">
<div class="overlay_open">
</div>
</div>
</div>
<!-- Third Page #a3 -->
<div id="i3" class="page">
</div>
</div>
</div>
</div>
</div>
</body>
</html>
This simplified version works exactly like i want, and the transition is more fluid too.
body, .container { margin: 0; padding: 0;}
a {position: absolute}
.container .overlay {
position: fixed;
margin: 0;
padding: 0;
height: 100%;
width: 100%;
visibility: hidden;
opacity: 0;
-webkit-transform: scale(0.9);
transform: scale(0.9);
-webkit-transition: -webkit-transform 0.2s, opacity 0.2s, visibility 0s 0.2s;
transition: transform 0.2s, opacity 0.2s, visibility 0s 0.2s;
background-color: chocolate;
z-index: 2;
}
#c:target .overlay {
visibility: visible;
opacity: 0.8;
-webkit-transform: scale(1);
transform: scale(1);
-webkit-transition: -webkit-transform 0.4s, opacity 0.4s;
transition: transform 0.4s, opacity 0.4s;
}
<body>
<div id="c" class="container">
OPEN
<div class="overlay">
</div>
</div>
</body>