mobile safari compatibility - html

I have divs set to be 100% width of the page which works fine in safari big browser, however when I preview the site in mobile safari the divs are sliding left and right and even falling of the page when slid to the left. The fixed nav bar also displays major juddering on scroll in mobile safari?
/*navlist*/
.navigation {
width: 100%;
background: #fff;
padding-top: 40px;
padding-bottom: 40px;
}
.navlist {
display: inline-block;
}
.navlist:after {
content: '';
display: block;
height: 1.5px;
width: 0;
background: transparent;
transition: width .5s ease, background-color .5s ease;
}
.navlist:hover:after {
width: 100%;
background: grey;
transition: width .5s ease, background-color .5s ease;
}
/*----/----navlist*/
/*global styles*/
body {
width: 100%;
margin: 0;
list-style: none;
text-decoration: none;
font-size: 1.05em;
font-family: Helvetica Neue, Helvetica, Arial, Sans-serif;
}
a {
appearance: none;
font-size: 1.05em;
font-family: Helvetica Neue, Helvetica, Arial, Sans-serif;
background: transparent;
color: grey;
border: none;
letter-spacing: 0.15em;
text-transform: uppercase;
transition: color 0.5s ease;
list-style: none;
text-decoration: none;
}
/*----/----global styles*/
/*navigation icon*/
#toggle-menu {
float: right;
display: block;
width: 15px;
height: 15px;
padding: 20px;
}
#toggle-menu div {
width: 15px;
height: 15px;
position: relative;
}
.header #toggle-menu span {
display: block;
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;
}
#toggle-menu span.top {
top: 0px;
}
#toggle-menu span.middle {
top: 6px;
}
#toggle-menu span.bottom {
top: 12px;
}
/*----/----navigation icon*/
/*Nav Bar*/
.header {
/*border-bottom: 0.5px solid rgba(0,0,0,.2);*/
width: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 99999;
background-color: rgb(184, 184, 184);
/*background: none;*/
}
.whitenavbar {
background: white;
}
.nav {
display: none;
list-style-type: none;
position: fixed;
width: 100%;
text-align: center;
left: 0;
top: 55px;
border-bottom: 0.5px solid rgba(0, 0, 0, .2);
border-top: 0.5px solid rgba(0, 0, 0, .2);
cursor: pointer;
color: #545454;
font-size: .8em;
letter-spacing: 0.05em;
}
.nav li {
padding-left: 30px;
padding-right: 30px;
background: #fff;
margin-top: 50px;
margin-bottom: 50px;
}
.seemore {
display: inline-block;
padding-right: 20px;
}
#navpromo {
border-top: 0.5px solid rgba(0, 0, 0, .2);
padding-bottom: 10px;
background: #ffffff;
}
/*----/----Nav Bar*/
/*in*/
.in {
float: left;
display: inline-block;
width: 25px;
height: 25px;
padding: 15px;
cursor: pointer;
color: #fff;
font-size: .8em;
letter-spacing: 0.05em;
border-top: 0.5px solid rgba(0, 0, 0, .2);
}
/*----/----in*/
/*logo*/
.logo {
position: absolute;
left: 47%;
display: inline-block;
width: 15px;
height: 15px;
padding: 18px;
cursor: pointer;
color: #fff;
font-size: .8em;
letter-spacing: 0.05em;
}
/*----/----logo*/
/*Panels*/
.projects-container {
width: 100%;
height: auto;
overflow: auto;
text-align: center;
margin: 0;
box-sizing: border-box;
display: inline-block;
-webkit-animation: fadein 3s;
/* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 3s;
/* Firefox < 16 */
-ms-animation: fadein 3s;
/* Internet Explorer */
-o-animation: fadein 3s;
/* Opera < 12.1 */
animation: fadein 3s;
border-bottom: 0.5px solid rgba(0, 0, 0, .2);
}
.projects {
height: 200px;
width: 100%;
background-size: cover;
-webkit-transition: all 500ms ease-out;
-moz-transition: all 500ms ease-out;
-o-transition: all 500ms ease-out;
transition: all 500ms ease-out;
color: transparent;
line-height: 200px;
font-size: 2.5em;
text-align: center;
appearance: none;
font-size: 1.05em;
font-family: Helvetica Neue, Helvetica, Arial, Sans-serif;
letter-spacing: 0.15em;
text-transform: uppercase;
list-style: none;
text-decoration: none;
}
.projects:hover {
text-align: center;
cursor: pointer;
background: #DEDDDD;
opacity: .4;
color: #545454;
}
.panel {
width: 100%;
color: #adadad;
height: 15em;
padding: 7em;
box-sizing: border-box;
background: #ffffff;
border-top: 0.5px solid rgba(0, 0, 0, .2);
text-align: center;
}
#panel1 {
background: #b8b8b8;
height: 30em;
}
/*----/----Panels*/
/****landscape****/
#media only screen and (max-width: 555px) {
.nav li {
display: block;
margin-top: 20px;
margin-bottom: 20px;
}
.navlist:after {
content: '';
display: block;
height: 1.5px;
width: 0;
background: transparent;
transition: width .5s ease, background-color .5s ease;
}
.navlist:hover:after {
width: 100%;
background: grey;
transition: width .5s ease, background-color .5s ease;
}
}
/*----/----Landscape*/
<div class="header">
<div class="navbar">
<a href="" class="in" style="display: inline-block;">
<svg class="navinstagram" 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">
<path d="M42.7,122.7H21.3V54h21.4V122.7z M32,44.6c-6.8,0-12.4-5.6-12.4-12.4c0-6.8,5.5-12.4,12.4-12.4
c6.8,0,12.4,5.5,12.4,12.4C44.4,39,38.9,44.6,32,44.6z M122.7,122.7h-21.3V89.3c0-8-0.1-18.2-11.1-18.2c-11.1,0-12.8,8.7-12.8,17.6
v34H56.1V54h20.5v9.4h0.3c2.8-5.4,9.8-11.1,20.2-11.1c21.6,0,25.6,14.2,25.6,32.7V122.7z" />
<g>
<path style="fill:#FFFFFF;" d="M151.9,120c0.7-0.1,1-0.5,1-1.1c0-0.8-0.5-1.1-1.4-1.1H150v4h0.6V120h0.7l0,0l1.1,1.7h0.6L151.9,120
L151.9,120z M151.3,119.6h-0.7v-1.4h0.9c0.4,0,0.9,0.1,0.9,0.6C152.4,119.5,151.9,119.6,151.3,119.6z" />
<path style="fill:#FFFFFF;" d="M151.3,116c-2.1,0-3.8,1.7-3.8,3.8c0,2.1,1.7,3.8,3.8,3.8c2.1,0,3.8-1.7,3.8-3.8
C155.2,117.6,153.5,116,151.3,116z M151.3,123.1c-1.8,0-3.3-1.4-3.3-3.3c0-1.9,1.4-3.3,3.3-3.3c1.8,0,3.3,1.4,3.3,3.3
C154.6,121.7,153.2,123.1,151.3,123.1z" />
</g>
</svg>
</a>
Logo
<a id="toggle-menu">
<div>
<span class="top"></span>
<span class="middle"></span>
<span class="bottom"></span>
</div>
</a>
</div>
<div class="nav">
<div class="navigation">
<ul>
<li class="navlist">Home
</li>
<li class="navlist">Work
</li>
<li class="navlist">Contact
</li>
</ul>
</div>
<div id="navpromo">
<ul>
<li class="seemore">Want to see more? Check out my instagram!</li>
<div class='instbtn-cont'>
<a class='instbtn' href='#'>
Instagram
<span class='line-1'></span>
<span class='line-2'></span>
<span class='line-3'></span>
<span class='line-4'></span>
</a>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="maincontent">
<div class="panel" id="panel1">
<div id="hero"></div>
<div id="scroll">
<a href="#panel2">
<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>
</a>
</div>
</div>
<div class="projects-container" id="panel2">
<div class="projects" style="">
<span class="project 1">Work Title 1</span>
</div>
</div>
<div class="projects-container">
<div class="projects" style="">
<span class="project 1">Work Title 2</span>
</div>
</div>
<div class="projects-container">
<div class="projects" style="">
<span class="project 1">Work Title 3</span>
</div>
</div>
<div class="projects-container">
<div class="projects" style="">
<span class="project 1">Work Title 4</span>
</div>
</div>
<div class="projects-container">
<div class="projects" style="">
<span class="project 1">Work Title 5</span>
</div>
</div>
<div class="projects-container">
<div class="projects" style="">
<span class="project 1">Work Title 6</span>
</div>
</div>

Related

Scrolling issues on Mobile

I need help with my contact form, the screen isn't in fixed position and some element is making the page being able to scroll on mobile when its not supposed to since everything is aligned in the center. I tried removing padding in container in the Mobile query but that did not work and I can't seem to find out why its scrolling, I changed the viewport to 100% width and that fixed the issue but that will not work in the long run since my website is supposed to be responsive and I changed the viewport back to initial scale and everything as seen in the HTML code but the scrolling issue comes back.
CSS and HTML
#media screen and (max-width: 500px) /* Mobile */ {
* {
box-sizing: border-box;
}
#navigation {
display: none;
}
input[type=text3], select, textarea {
width: 55%; /* Full width */
padding: 30px; /* Some padding */
margin-top: 0px;
outline: none;
color: #ff0055;
text-align: center;
border: 1px solid #f3f3f3; /* Gray border */
border-radius: 100px; /* Rounded borders */
}
input[type=text2], select, textarea {
width: 55%; /* Full width */
padding: 20px; /* Some padding */
color: #ff0055;
outline: none;
text-align: center;
border: 1px solid #f3f3f3; /* Gray border */
border-radius: 100px; /* Rounded borders */
}
input[type=text2]:hover, select, textarea {
width: 55%; /* Full width */
padding: 20px; /* Some padding */
color: #ff0055;
text-align: center;
border: 2px solid #ff0055; /* Gray border */
border-radius: 100px; /* Rounded borders */
transition: all 0.3s ease 0s;
}
input[type=text3]:hover, select, textarea {
width: 55%; /* Full width */
padding: 30px; /* Some padding */
margin-top: 0px;
color: #ff0055;
text-align: center;
border: 2px solid #ff0055; /* Gray border */
border-radius: 100px; /* Rounded borders */
transition: all 0.3s ease 0s;
}
input[type=text], select, textarea {
width: 55%; /* Full width */
padding: 20px; /* Some padding */
text-align: center;
outline: none;
color: #FF0055;
border: 1px solid #f3f3f3; /* Gray border */
border-radius: 100px; /* Rounded borders */
}
input[type=text]:hover, select, textarea {
width: 55%;
padding: 20px; /* Some padding */
text-align: center;
border: 2px solid #ff0055; /* Gray border */
border-radius: 50px; /* Rounded borders */
transition: all 0.3s ease 0s;
}
input[type=submit] {
background-color: #001FFF;
color: white;
font-size: 16px;
font-family: 'Open Sans', sans-serif;
border: none;
cursor: pointer;
border-color: #000000;
text-align: center;
display: inline-block;
text-decoration: none;
text-shadow: none;
margin: 50px 175px;
padding: 10px 50px;
border: none;
border-radius: 100px;
outline: none;
cursor: pointer;
}
input[type=submit]:hover {
background-color: #0019CF;
color: white;
text-align: center;
outline: none;
-ms-transform: translate(-50%, -50%);
transition: all 0.3s ease 0s;
-webkit-box-shadow: 0px 20px 15px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0px 20px 15px rgba(0, 0, 0, 0.1);
box-shadow: 0px 20px 15px rgba(0, 0, 0, 0.1);
}
.container {
border-radius: 100%;
font-size: 20px;
text-align: center;
background-color: #FFFFFF;
display: inline-block;
}
.nav2 {
height: 50px;
width: 100%;
margin: 0 auto;
background-color: white;
position: fixed;
z-index: 9999;
}
.nav2 > .nav-header {
display: inline;
margin: 0 auto;
z-index: 9999;
}
.nav2 > .nav-header > .nav-title {
display: inline-block;
font-size: 20px;
margin: 0 auto;
color: #fff;
font-family: 'Pacifico', cursive;
padding: 5px 10px 10px 15px;
}
#header {
display: inline-block;
font-size: 20px;
position: fixed;
margin: 0 auto;
color: #000;
z-index: 10000;
font-family: 'Pacifico', cursive;
padding: 5px 10px 10px 15px;
}
.nav2 > .nav-btn {
display: none;
margin: 0 auto;
}
.nav2 > .nav-links {
display: inline;
z-index: 9999;
margin: 0 auto;
float: right;
font-size: 15px;
}
.nav2 > .nav-links > a {
display: inline-block;
z-index: 9999;
margin: 0 auto;
text-align: center;
background-color: white;
padding: 13px 10px 13px 10px;
text-decoration: none;
color: #000;
}
.nav2 > .nav-links > a:hover {
background-color: #005DFF;
color: white;
z-index: 9999;
}
.nav2 > #nav-check {
display: none;
}
#media (max-width:600px) {
.nav2 > .nav-btn {
z-index: 9999;
display: inline-block;
position: absolute;
right: 0px;
top: 0px;
}
.nav2 > .nav-btn > label {
display: inline-block;
z-index: 9999;
background-color: white;
color: black;
width: 50px;
height: 50px;
padding: 13px;
}
.nav2 > .nav-btn > label:hover {
background-color: blue);
z-index: 9999;
}
.nav2 > .nav-btn > label > span {
display: block;
z-index: 9999;
width: 25px;
height: 10px;
border-top: 3px solid black;
}
.nav2 > .nav-links {
position: absolute;
display: block;
width: 100%;
background-color: #fff;
height: 0px;
z-index: 9999;
transition: all 0.3s ease-in;
overflow-y: hidden;
top: 50px;
left: 0px;
}
.nav2 > .nav-links > a {
display: block;
z-index: 9999;
color: black;
width: 100%;
}
.nav2> #nav-check:not(:checked) + .nav-links {
height: 0px;
z-index: 9999;
}
.nav2 > #nav-check:checked + .nav-links {
height: calc(100vh - 50px);
z-index: 9999;
overflow-y: auto;
}
}
}
.button {
position: absolute;
top: 130%;
left: 50%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transition: all 0.3s ease 0s;
-webkit-box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
background-color: #FFFFFF;
color: black;
font-size: 16px;
padding: 32px 24px;
font-family: 'Open Sans', sans-serif;
border: none;
cursor: pointer;
border-radius: 100px;
border-color: #000000;
text-align: center;
display: flex;
text-decoration: none;
text-shadow: none;
align-items: center;
justify-content: center;
}
.button:hover {
background-color: #FFFFFF;
box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.3);
color: #FF0055;
text-shadow: none;
text-decoration: none;
}
#keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Firefox < 16 */
#-moz-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Safari, Chrome and Opera > 12.1 */
#-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Internet Explorer */
#-ms-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Opera < 12.1 */
#-o-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
body, html {
height: 100%;
margin: 0;
font-family: 'Overpass', sans-serif;
background: #ffffff;
}
p {
text-align: center;
}
h1 {
text-align: center;
padding: 100px;
font-weight: bolder;
}
h2 {
padding: 10px 10px;
font-weight: bolder;
}
h3 {
font-weight: bolder;
top: 50%;
left: -10%;
transform: translate(0%, -100%);
}
#header.active {
box-shadow: 0 0 5px rgba(0,0,0,0.3);
-webkit-animation: fadein 1s; /* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 1s; /* Firefox < 16 */
-ms-animation: fadein 1s; /* Internet Explorer */
-o-animation: fadein 1s; /* Opera < 12.1 */
animation: fadein 1s;
}
a:link {
position: relative;
color: #000000;
text-decoration: none;
}
a:hover {
color: #000000;
}
a:link:before {
content: "";
position: absolute;
width: 100%;
height: 2px;
bottom: 0;
left: 0;
background-color: #000000;
visibility: hidden;
-webkit-transform: scaleX(0);
transform: scaleX(0);
-webkit-transition: all 0.3s ease-in-out 0s;
transition: all 0.3s ease-in-out 0s;
}
.nav:hover:before {
visibility: visible;
-webkit-transform: scaleX(1);
transform: scaleX(1);
}
.active:hover:before {
visibility: visible;
-webkit-transform: scaleX(1);
transform: scaleX(1);
}
a:link {
cursor: pointer;
padding: 13px;
text-decoration: none;
}
a:link:hover {
padding: 13px;
-webkit-transition: height 0.5s ease;
-moz-transition: height 0.5s ease;
-o-transition: height 0.5s ease;
-ms-transition: height 0.5s ease;
transition: background-color 0.5s ease;
-webkit-transition: background-color 0.5s ease;
-moz-transition: background-color 0.5s ease;
-o-transition: background-color 0.5s ease;
-ms-transition: background-color 0.5s ease;
transition: background-color 0.5s ease;
}
a:link:active {
padding: 13px;
-webkit-transition: height 0.5s ease;
-moz-transition: height 0.5s ease;
-o-transition: height 0.5s ease;
-ms-transition: height 0.5s ease;
transition: background-color 0.5s ease;
-webkit-transition: background-color 0.5s ease;
-moz-transition: background-color 0.5s ease;
-o-transition: background-color 0.5s ease;
-ms-transition: background-color 0.5s ease;
transition: background-color 0.5s ease;
}
a:visited {
color: #000000;
}
#header.scroll {
background-color: #000000;
opacity: 0.5;
}
.main {
border-radius: 100px;
padding: 13px;
border: none!important;
text-decoration: none!important
}
.main:hover {
background-color: #00439F;
color: white;
border: none;
padding: 13px;
text-decoration: none!important;
box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
position: fixed;
margin: -13px -90px;
border-radius: 100px;
-webkit-animation:bounce 1s infinite;
}
</style>
<!doctype html>
<html>
<head>
<link href="https://cdn.rawgit.com/michalsnik/aos/2.1.1/dist/aos.css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>adamferreira - Contact</title>
<script src="https://cdn.rawgit.com/michalsnik/aos/2.1.1/dist/aos.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="header">adamferreira</div>
<div id="navigation"
<ul>
<a class="main" href="portfolio.html">Portfolio</a>
<a class="nav" href="index.html">Home</a>
<a class="nav" href="contact.php">Contact</a>
<a class="nav" href="featured.html">Featured</a>
<a class="nav" href="story-highlights.html">Story Highlights</a>
</ul>
</div>
</div>
</div>
<div class="nav2">
<div class="nav-header">
<div class="nav-title"></div>
</div>
<div class="nav-btn">
<label for="nav-check">
<span></span>
<span></span>
<span></span>
</label>
</div>
<input type="checkbox" id="nav-check">
<div class="nav-links">
Portfolio
Home
Contact
Featured
Story Highlights
</div>
</div>
</head>
<body>
<div class="headerBackground"></div>
<div class="container" data-aos="ease-in-out-back" data-aos="zoom out">
<h1>Contact</h1>
<form method="POST">
<input type="text" name="firstname" placeholder="Your name..." style="font-size: 15px;">
<input type="text2" name="lastname" placeholder="Your last name..." style="font-size: 15px;">
<input type="text3" name="comment" placeholder="Type your comment..." style="font-size: 15px;">
<input type="submit" class="btn" name="submit" value="Submit">
</form>
</div>
</body>
</html>
Your submit button is absolutely massive due to the margin: 50px 175px;. Just the margins take up 350px. Factor in the actual width of the button (50px) and you have 400px right there.
If you set a viewport tag (width=device-width), you're looking at 375px (or so) for an iPhone 6/7/8. So, excluding any other margin/padding to the body, you're already overflowing.
Edit:
Rather than use a defined value to center/offset the button, you could change display from inline-block to block. Then margin: 50px 175px to margin: 50px auto; which will center. flexbox would also help, but requires a bit more changes to the container/children.
Here's the rendered HTML/CSS after adjusting submit to display: block; margin: 50px auto (no more horizontal scroll!):
#media screen and (max-width: 500px)
/* Mobile */
{
* {
box-sizing: border-box;
}
#navigation {
display: none;
}
input[type=text3], select, textarea {
width: 55%;
/* Full width */
padding: 30px;
/* Some padding */
margin-top: 0px;
outline: none;
color: #ff0055;
text-align: center;
border: 1px solid #f3f3f3;
/* Gray border */
border-radius: 100px;
/* Rounded borders */
}
input[type=text2], select, textarea {
width: 55%;
/* Full width */
padding: 20px;
/* Some padding */
color: #ff0055;
outline: none;
text-align: center;
border: 1px solid #f3f3f3;
/* Gray border */
border-radius: 100px;
/* Rounded borders */
}
input[type=text2]:hover, select, textarea {
width: 55%;
/* Full width */
padding: 20px;
/* Some padding */
color: #ff0055;
text-align: center;
border: 2px solid #ff0055;
/* Gray border */
border-radius: 100px;
/* Rounded borders */
transition: all 0.3s ease 0s;
}
input[type=text3]:hover, select, textarea {
width: 55%;
/* Full width */
padding: 30px;
/* Some padding */
margin-top: 0px;
color: #ff0055;
text-align: center;
border: 2px solid #ff0055;
/* Gray border */
border-radius: 100px;
/* Rounded borders */
transition: all 0.3s ease 0s;
}
input[type=text], select, textarea {
width: 55%;
/* Full width */
padding: 20px;
/* Some padding */
text-align: center;
outline: none;
color: #FF0055;
border: 1px solid #f3f3f3;
/* Gray border */
border-radius: 100px;
/* Rounded borders */
}
input[type=text]:hover, select, textarea {
width: 55%;
padding: 20px;
/* Some padding */
text-align: center;
border: 2px solid #ff0055;
/* Gray border */
border-radius: 50px;
/* Rounded borders */
transition: all 0.3s ease 0s;
}
input[type=submit] {
background-color: #001FFF;
color: white;
font-size: 16px;
font-family: 'Open Sans', sans-serif;
border: none;
cursor: pointer;
border-color: #000000;
text-align: center;
display: block;
text-decoration: none;
text-shadow: none;
margin: 50px auto;
padding: 10px 50px;
border: none;
border-radius: 100px;
outline: none;
cursor: pointer;
}
input[type=submit]:hover {
background-color: #0019CF;
color: white;
text-align: center;
outline: none;
-ms-transform: translate(-50%, -50%);
transition: all 0.3s ease 0s;
-webkit-box-shadow: 0px 20px 15px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0px 20px 15px rgba(0, 0, 0, 0.1);
box-shadow: 0px 20px 15px rgba(0, 0, 0, 0.1);
}
.container {
border-radius: 100%;
font-size: 20px;
text-align: center;
background-color: #FFFFFF;
display: inline-block;
}
.nav2 {
height: 50px;
width: 100%;
margin: 0 auto;
background-color: white;
position: fixed;
z-index: 9999;
}
.nav2 > .nav-header {
display: inline;
margin: 0 auto;
z-index: 9999;
}
.nav2 > .nav-header > .nav-title {
display: inline-block;
font-size: 20px;
margin: 0 auto;
color: #fff;
font-family: 'Pacifico', cursive;
padding: 5px 10px 10px 15px;
}
#header {
display: inline-block;
font-size: 20px;
position: fixed;
margin: 0 auto;
color: #000;
z-index: 10000;
font-family: 'Pacifico', cursive;
padding: 5px 10px 10px 15px;
}
.nav2 > .nav-btn {
display: none;
margin: 0 auto;
}
.nav2 > .nav-links {
display: inline;
z-index: 9999;
margin: 0 auto;
float: right;
font-size: 15px;
}
.nav2 > .nav-links > a {
display: inline-block;
z-index: 9999;
margin: 0 auto;
text-align: center;
background-color: white;
padding: 13px 10px 13px 10px;
text-decoration: none;
color: #000;
}
.nav2 > .nav-links > a:hover {
background-color: #005DFF;
color: white;
z-index: 9999;
}
.nav2 > #nav-check {
display: none;
}
#media (max-width:600px) {
.nav2 > .nav-btn {
z-index: 9999;
display: inline-block;
position: absolute;
right: 0px;
top: 0px;
}
.nav2 > .nav-btn > label {
display: inline-block;
z-index: 9999;
background-color: white;
color: black;
width: 50px;
height: 50px;
padding: 13px;
}
.nav2 > .nav-btn > label:hover {
background-color: blue);
z-index: 9999;
}
.nav2 > .nav-btn > label > span {
display: block;
z-index: 9999;
width: 25px;
height: 10px;
border-top: 3px solid black;
}
.nav2 > .nav-links {
position: absolute;
display: block;
width: 100%;
background-color: #fff;
height: 0px;
z-index: 9999;
transition: all 0.3s ease-in;
overflow-y: hidden;
top: 50px;
left: 0px;
}
.nav2 > .nav-links > a {
display: block;
z-index: 9999;
color: black;
width: 100%;
}
.nav2> #nav-check:not(:checked) + .nav-links {
height: 0px;
z-index: 9999;
}
.nav2 > #nav-check:checked + .nav-links {
height: calc(100vh - 50px);
z-index: 9999;
overflow-y: auto;
}
}
}
.button {
position: absolute;
top: 130%;
left: 50%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transition: all 0.3s ease 0s;
-webkit-box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
background-color: #FFFFFF;
color: black;
font-size: 16px;
padding: 32px 24px;
font-family: 'Open Sans', sans-serif;
border: none;
cursor: pointer;
border-radius: 100px;
border-color: #000000;
text-align: center;
display: flex;
text-decoration: none;
text-shadow: none;
align-items: center;
justify-content: center;
}
.button:hover {
background-color: #FFFFFF;
box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.3);
color: #FF0055;
text-shadow: none;
text-decoration: none;
}
#keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Firefox < 16 */
#-moz-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Safari, Chrome and Opera > 12.1 */
#-webkit-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Internet Explorer */
#-ms-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Opera < 12.1 */
#-o-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
body, html {
height: 100%;
margin: 0;
font-family: 'Overpass', sans-serif;
background: #ffffff;
}
p {
text-align: center;
}
h1 {
text-align: center;
padding: 100px;
font-weight: bolder;
}
h2 {
padding: 10px 10px;
font-weight: bolder;
}
h3 {
font-weight: bolder;
top: 50%;
left: -10%;
transform: translate(0%, -100%);
}
#header.active {
box-shadow: 0 0 5px rgba(0,0,0,0.3);
-webkit-animation: fadein 1s;
/* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 1s;
/* Firefox < 16 */
-ms-animation: fadein 1s;
/* Internet Explorer */
-o-animation: fadein 1s;
/* Opera < 12.1 */
animation: fadein 1s;
}
a:link {
position: relative;
color: #000000;
text-decoration: none;
}
a:hover {
color: #000000;
}
a:link:before {
content: "";
position: absolute;
width: 100%;
height: 2px;
bottom: 0;
left: 0;
background-color: #000000;
visibility: hidden;
-webkit-transform: scaleX(0);
transform: scaleX(0);
-webkit-transition: all 0.3s ease-in-out 0s;
transition: all 0.3s ease-in-out 0s;
}
.nav:hover:before {
visibility: visible;
-webkit-transform: scaleX(1);
transform: scaleX(1);
}
.active:hover:before {
visibility: visible;
-webkit-transform: scaleX(1);
transform: scaleX(1);
}
a:link {
cursor: pointer;
padding: 13px;
text-decoration: none;
}
a:link:hover {
padding: 13px;
-webkit-transition: height 0.5s ease;
-moz-transition: height 0.5s ease;
-o-transition: height 0.5s ease;
-ms-transition: height 0.5s ease;
transition: background-color 0.5s ease;
-webkit-transition: background-color 0.5s ease;
-moz-transition: background-color 0.5s ease;
-o-transition: background-color 0.5s ease;
-ms-transition: background-color 0.5s ease;
transition: background-color 0.5s ease;
}
a:link:active {
padding: 13px;
-webkit-transition: height 0.5s ease;
-moz-transition: height 0.5s ease;
-o-transition: height 0.5s ease;
-ms-transition: height 0.5s ease;
transition: background-color 0.5s ease;
-webkit-transition: background-color 0.5s ease;
-moz-transition: background-color 0.5s ease;
-o-transition: background-color 0.5s ease;
-ms-transition: background-color 0.5s ease;
transition: background-color 0.5s ease;
}
a:visited {
color: #000000;
}
#header.scroll {
background-color: #000000;
opacity: 0.5;
}
.main {
border-radius: 100px;
padding: 13px;
border: none!important;
text-decoration: none!important
}
.main:hover {
background-color: #00439F;
color: white;
border: none;
padding: 13px;
text-decoration: none!important;
box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
position: fixed;
margin: -13px -90px;
border-radius: 100px;
-webkit-animation:bounce 1s infinite;
}
<!doctype html>
<html>
<head>
<link href="https://cdn.rawgit.com/michalsnik/aos/2.1.1/dist/aos.css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>adamferreira - Contact</title>
<script src="https://cdn.rawgit.com/michalsnik/aos/2.1.1/dist/aos.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="header">adamferreira</div>
<div id="navigation"
<ul>
<a class="main" href="portfolio.html">Portfolio</a>
<a class="nav" href="index.html">Home</a>
<a class="nav" href="contact.php">Contact</a>
<a class="nav" href="featured.html">Featured</a>
<a class="nav" href="story-highlights.html">Story Highlights</a>
</ul>
</div>
</div>
</div>
<div class="nav2">
<div class="nav-header">
<div class="nav-title"></div>
</div>
<div class="nav-btn">
<label for="nav-check">
<span></span>
<span></span>
<span></span>
</label>
</div>
<input type="checkbox" id="nav-check">
<div class="nav-links">
Portfolio
Home
Contact
Featured
Story Highlights
</div>
</div>
</head>
<body>
<div class="headerBackground"></div>
<div class="container" data-aos="ease-in-out-back" data-aos="zoom out">
<h1>Contact</h1>
<form method="POST">
<input type="text" name="firstname" placeholder="Your name..." style="font-size: 15px;">
<input type="text2" name="lastname" placeholder="Your last name..." style="font-size: 15px;">
<input type="text3" name="comment" placeholder="Type your comment..." style="font-size: 15px;">
<input type="submit" class="btn" name="submit" value="Submit">
</form>
</div>
</body>
</html>

Need help centering text and overlapping with background color

I'm having trouble centering my home page text (the tag). I'm not sure why it's not working.
I have a button that performs a short animation when the user hovers over the button. The button is supposed to fill with red but when I change the background color of the #main container, the button loses its animation. I'm assuming that it's getting hidden behind main's background color but I don't know how to resolve this issue.
Thanks!
/*CSS DOCUMENT*/
/* Notes:
Hashtags are for ID's and dots(.) are for classes
If you do #nav .selected for example, it would look for .selected within the nav ID.
*/
/*Import stuff for button animations */
#import url(https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css);
#import url(https://fonts.googleapis.com/css?family=Lato:300,400,700);
/*Global Button Syles*/
a.animated-button:link, a.animated-button:visited {
position: relative;
display: block;
margin: 30px auto 0;
padding: 14px 15px;
color: #fff;
font-size:14px;
font-weight: bold;
text-align: center;
text-decoration: none;
text-transform: uppercase;
overflow: hidden;
letter-spacing: .08em;
border-radius: 0;
text-shadow: 0 0 1px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(0, 0, 0, 0.2);
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
transition: all 1s ease;
}
a.animated-button:link:after, a.animated-button:visited:after {
content: "";
position: absolute;
height: 0%;
left: 50%;
top: 50%;
width: 150%;
z-index: -1;
-webkit-transition: all 0.75s ease 0s;
-moz-transition: all 0.75s ease 0s;
-o-transition: all 0.75s ease 0s;
transition: all 0.75s ease 0s;
}
a.animated-button:link:hover, a.animated-button:visited:hover {
color: #FFF;
text-shadow: none;
}
a.animated-button:link:hover:after, a.animated-button:visited:hover:after {
height: 450%;
}
a.animated-button:link, a.animated-button:visited {
position: relative;
display: block;
margin: 30px auto 0;
padding: 14px 15px;
color: #fff;
font-size:14px;
border-radius: 0;
font-weight: bold;
text-align: center;
text-decoration: none;
text-transform: uppercase;
overflow: hidden;
letter-spacing: .08em;
text-shadow: 0 0 1px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(0, 0, 0, 0.2);
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
transition: all 1s ease;
}
/*End Global Button Styles*/
/*Victoria Button Style 3*/
a.animated-button.victoria-three {
border: 2px solid #D24D57;
color: #333;
}
a.animated-button.victoria-three:after {
background: #D24D57;
opacity: .5;
-moz-transform: translateX(-50%) translateY(-50%);
-ms-transform: translateX(-50%) translateY(-50%);
-webkit-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
}
a.animated-button.victoria-three:hover:after {
height: 140%;
opacity: 1;
}
body{
background-color: #EEEEEE;
font-family: 'Montserrat', sans-serif;
}
a{
text-decoration: none;
color: #D24D57;
}
h1{
padding: 10px;
align: left;
}
.light_saber{
align:bottom;
margin:5px;
}
h2{
align:center;
}
#container{
width: auto;
margin-left: 0px;
margin-right: auto;
}
#header{
background-color: #D24D57;
color: white;
padding: 10px;
}
#content{
padding: 10px 10px 10px 10px; /*top right bottom left*/
width: auto;
}
#nav{
width: auto;
height: auto;
background-color: #999;
}
#nav ul{
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
#nav li {
float: left;
}
#nav li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover {
background-color: #111;
}
#nav .selected{
font-weight: bold;
}
#main{
width: auto;
height: 2000px;
float: center;
background-color: #999;
}
#main .profile_picture{
border-radius: 20px;
width: 250px;
height: 350px;
padding: 10px;
float: right;
background-color: #333;
}
#footer{
clear: both; /*Lets get past all the floating elements and then display footer*/
padding: 10px;
background-color: #999;
color: white;
text-align: center;
}
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Siman Shrestha</title>
<link href = "stylesheet.css" rel="stylesheet" type="text/css" />
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
</head>
<body>
<div id="container">
<div id="header">
<h1>Siman Shrestha</h1>
<div class="light_saber">
<img src="light_saber.gif" alt="Whoops, something went wrong :-(">
</div>
</div>
<div id="content">
<div id="nav">
<ul>
<li><a class="selected" href=""> Home </a></li> <!--creates a class tag and hyperlink*/-->
<li><a class="selected" href=""> About </a></li>
<li><a class="selected" href=""> Contact </a></li>
</ul>
</div>
<div id="main">
<h2>Home Page</h2>
<img src="IMG_1689.jpg" class="profile_picture" alt="Whoops, something went wrong :-(">
<!--Resume Button-->
<div class="col-md-3 col-sm-3 col-xs-6">
Resume
</div>
<p>
Saucin'
</P>
</div>
</div>
<div id="footer">
Copyright © 2017 Siman Shrestha
</div>
</div>
</body>
</html>
Changing the z-index works
/*CSS DOCUMENT*/
/* Notes:
Hashtags are for ID's and dots(.) are for classes
If you do #nav .selected for example, it would look for .selected within the nav ID.
*/
/*Import stuff for button animations */
#import url(https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css);
#import url(https://fonts.googleapis.com/css?family=Lato:300,400,700);
/*Global Button Syles*/
a.animated-button:link, a.animated-button:visited {
position: relative;
display: block;
margin: 30px auto 0;
padding: 14px 15px;
color: #fff;
font-size:14px;
font-weight: bold;
text-align: center;
text-decoration: none;
text-transform: uppercase;
overflow: hidden;
letter-spacing: .08em;
border-radius: 0;
text-shadow: 0 0 1px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(0, 0, 0, 0.2);
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
transition: all 1s ease;
}
a.animated-button:link:after, a.animated-button:visited:after {
content: "";
position: absolute;
height: 0%;
left: 50%;
top: 50%;
width: 150%;
z-index: -1;
-webkit-transition: all 0.75s ease 0s;
-moz-transition: all 0.75s ease 0s;
-o-transition: all 0.75s ease 0s;
transition: all 0.75s ease 0s;
}
a.animated-button:link:hover, a.animated-button:visited:hover {
color: #FFF;
text-shadow: none;
}
a.animated-button:link:hover:after, a.animated-button:visited:hover:after {
height: 450%;
}
a.animated-button:link, a.animated-button:visited {
position: relative;
display: block;
margin: 30px auto 0;
padding: 14px 15px;
color: #fff;
font-size:14px;
border-radius: 0;
font-weight: bold;
text-align: center;
text-decoration: none;
text-transform: uppercase;
overflow: hidden;
letter-spacing: .08em;
text-shadow: 0 0 1px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(0, 0, 0, 0.2);
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
transition: all 1s ease;
}
/*End Global Button Styles*/
/*Victoria Button Style 3*/
a.animated-button.victoria-three {
border: 2px solid #D24D57;
color: #333;
z-index:998;
}
a.animated-button.victoria-three span{
z-index:999;
}
a.animated-button.victoria-three:after {
background: #D24D57;
opacity: .5;
-moz-transform: translateX(-50%) translateY(-50%);
-ms-transform: translateX(-50%) translateY(-50%);
-webkit-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
}
a.animated-button.victoria-three:hover:after {
height: 140%;
opacity: 1;
}
body{
background-color: #EEEEEE;
font-family: 'Montserrat', sans-serif;
}
a{
text-decoration: none;
color: #D24D57;
}
h1{
padding: 10px;
align: left;
}
.light_saber{
align:bottom;
margin:5px;
}
h2{
align:center;
}
#container{
width: auto;
margin-left: 0px;
margin-right: auto;
}
#header{
background-color: #D24D57;
color: white;
padding: 10px;
}
#content{
padding: 10px 10px 10px 10px; /*top right bottom left*/
width: auto;
}
#nav{
width: auto;
height: auto;
background-color: #999;
}
#nav ul{
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
#nav li {
float: left;
}
#nav li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover {
background-color: #111;
}
#nav .selected{
font-weight: bold;
}
#main{
width: auto;
height: 2000px;
float: center;
background-color: #999;
}
#main .profile_picture{
border-radius: 20px;
width: 250px;
height: 350px;
padding: 10px;
float: right;
background-color: #333;
}
#footer{
clear: both; /*Lets get past all the floating elements and then display footer*/
padding: 10px;
background-color: #999;
color: white;
text-align: center;
}
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Siman Shrestha</title>
<link href = "stylesheet.css" rel="stylesheet" type="text/css" />
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
</head>
<body>
<div id="container">
<div id="header">
<h1>Siman Shrestha</h1>
<div class="light_saber">
<img src="light_saber.gif" alt="Whoops, something went wrong :-(">
</div>
</div>
<div id="content">
<div id="nav">
<ul>
<li><a class="selected" href=""> Home </a></li> <!--creates a class tag and hyperlink*/-->
<li><a class="selected" href=""> About </a></li>
<li><a class="selected" href=""> Contact </a></li>
</ul>
</div>
<div id="main">
<h2>Home Page</h2>
<img src="IMG_1689.jpg" class="profile_picture" alt="Whoops, something went wrong :-(">
<!--Resume Button-->
<div class="col-md-3 col-sm-3 col-xs-6">
<span>Resume</span>
</div>
<p>
Saucin'
</P>
</div>
</div>
<div id="footer">
Copyright © 2017 Siman Shrestha
</div>
</div>
</body>
</html>

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 :).

TABBED Content not appearing with CSS put in

I have these codes on my site
HTML-
<ul class="tabs">
<li>
<input type="radio" checked name="tabs" id="tab1">
<label for="tab1">Twitter</label>
<div id="tab-content1" class="tab-content animated fadeIn">
<a class="twitter-timeline" href="https://twitter.com/1THUGRadio" data-widget-id="521855935606583296">Tweets by #1THUGRadio</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
</li>
<li>
<input type="radio" name="tabs" id="tab2">
<label for="tab2">Facebook</label>
<div id="tab-content2" class="tab-content animated fadeIn">
<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fthugcommunity&width=650&colorscheme=light&show_faces=true&border_color&stream=true&header=true&height=500" frameborder="0" scrolling="yes" style="background: white; border: currentColor; border-image: none; width: 650px; height: 500px; overflow: visible; float: left;" allowtransparency="true">
</iframe>
</div>
</li>
</ul>
as you can see it has the FB and Twitter feeds in it
CSS
.tabs input[type=radio] {
position: absolute;
top: -9999px;
left: -9999px;
}
.tabs {
width: 650px;
float: none;
list-style: none;
position: relative;
padding: 0;
margin: 75px auto;
}
.tabs li{
float: left;
}
.tabs label {
display: block;
padding: 10px 20px;
border-radius: 2px 2px 0 0;
color: #08C;
font-size: 24px;
font-weight: normal;
font-family: 'Lily Script One', helveti;
background: rgba(255,255,255,0.2);
cursor: pointer;
position: relative;
top: 3px;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.tabs label:hover {
background: rgba(255,255,255,0.5);
top: 0;
}
[id^=tab]:checked + label {
background: #08C;
color: white;
top: 0;
}
[id^=tab]:checked ~ [id^=tab-content] {
display: block;
}
.tab-content{
z-index: auto;
display: none;
text-align: left;
width: 100%;
font-size: 20px;
line-height: 140%;
padding-top: 10px;
background: #08C;
padding: 15px;
color: white;
position: absolute;
top: 53px;
left: 0;
box-sizing: border-box;
-webkit-animation-duration: 0.5s;
-o-animation-duration: 0.5s;
-moz-animation-duration: 0.5s;.tabs input[type=radio] {
position: absolute;
top: -9999px;
left: -9999px;
}
.tabs {
width: 650px;
float: none;
list-style: none;
position: relative;
padding: 0;
margin: 75px auto;
}
.tabs li{
float: left;
}
.tabs label {
display: block;
padding: 10px 20px;
border-radius: 2px 2px 0 0;
color: #08C;
font-size: 24px;
font-weight: normal;
font-family: 'Lily Script One', helveti;
background: rgba(255,255,255,0.2);
cursor: pointer;
position: relative;
top: 3px;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.tabs label:hover {
background: rgba(255,255,255,0.5);
top: 0;
}
[id^=tab]:checked + label {
background: #08C;
color: white;
top: 0;
}
[id^=tab]:checked ~ [id^=tab-content] {
display: block;
}
.tab-content{
z-index: 6;
display: none;
text-align: left;
width: 100%;
font-size: 20px;
line-height: 140%;
padding-top: 10px;
background: #08C;
position: relative;
padding: 15px;
color: white;
top: 53px;
left: 0;
box-sizing: border-box;
-webkit-animation-duration: 0.5s;
-o-animation-duration: 0.5s;
-moz-animation-duration: 0.5s;
animation-duration: 0.5s;
}
animation-duration: 0.5s;
}
When I put the coding in jfiddle.net everything shows up like it should. But when I drop it in the website only the tabs show up, not the content
First off, thanks for the lack of help I got from everyone. So I figured out it needed to have overflow: visible; not hidden.

Nav Menu Not Showing In Firefox

Please help! This project is for a job. I have built a navigation menu that displays fine in Chrome and Safari, the other required browser is Firefox, but the navigation menu isn't displaying at all.
Here is my code:
<body>
<div class="main">
<header>
<div id="logo"></div>
<nav id="login">
<li>Register</li>
<li>Login</li>
<li>Help</li>
</nav>
<div class="clear"></div>
<nav id="menu">
<li>Household</li>
<li>Toys</li>
<li>Pets</li>
<li>Music</li>
<li>Electronics</li>
</nav>
<!-- Slider -->
<div class="slider-wrapper">
<div id="slider" class="nivoSlider">
<img src="images/image1.jpg" alt="PS4">
<img src="images/image2.jpg" alt="PS4">
<img src="images/image3.jpg" alt="PS4">
</div>
</div>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
<!-- Slider -->
</header>
<section class="content">
<h1>Household</h1>
<section id="iowbg">
<img id="iowimage" src="./images/iow_lamp_2.jpg">
<div class="productname"><h2>Ikea Orgel Vreten Floor Lamp, Natural, Steel</h2></div>
<div class="productdesc"><h5>Shade of handmade paper, each shade is unique. Gives a soft mood light.</h5></div>
<div class="productprice"><h2 style="color: #900;">$19.99</h2></div>
</section>
<div class="clear"></div>
<section id="discounts">
<h2>Discounted Items</h2>
<figure id="discountsitem">
<img id="discountsimage" src="./images/discount_01.jpg" alt="">
<figcaption class="discountdesc">
Office Star 4-Foot Resin Multipurpose Table, Light Grey
</figcaption>
<figcaption class="regularprice">
$49.99
</figcaption>
<figcaption class="discountprice">
$39.99
</figcaption>
</figure>
<figure id="discountsitem">
<img id="discountsimage" src="./images/discount_02.jpg" alt="">
<figcaption class="discountdesc">
Aquarius Aq15005 Aquarius 5 Rounded 5-Gallon Aquarium Kit
</figcaption>
<figcaption class="regularprice">
$29.99
</figcaption>
<figcaption class="discountprice">
$19.99
</figcaption>
</figure>
<figure id="discountsitem">
<img id="discountsimage" src="./images/discount_03.jpg" alt="">
<figcaption class="discountdesc">
Intex Pull-out Sofa
</figcaption>
<figcaption class="regularprice">
$54.99
</figcaption>
<figcaption class="discountprice">
$44.99
</figcaption>
</figure>
<div class="clear"></div>
</section>
</section>
<footer>
<img class="imageset" src="images/01_household.jpg">
<img class="imageset" src="images/02_toys.jpg">
<img class="imageset" src="images/03_pets.jpg">
<img class="imageset" src="images/04_music.jpg">
<img class="imageset" src="images/05_electronics.jpg">
<form id="contact">
<h1>Contact Us</h1>
<label id="firstName" class="label">First Name: </label>
<input type="text" class="TextInput" value="Your First Name"></label><br>
<label id="lastName" class="label">Last Name: </label>
<input type="text" class="TextInput" value="Your Last Name"></label><br>
<label id="userEmail" class="label">Your Email: </label>
<input type="email" class="EmailInput" value="Your Email Address"><br>
<input type="submit" class="button" value="Submit">
</form>
<div class="clear"></div>
</footer>
<small>© 2013, Our Stuff Is Cheap But Good Co. | All Rights Reserved</small>
</div>
</body>
CSS
* {
font-family: Helvetica, Arial, sans-serif;
color: #404040;
}
a {
color: #404040;
text-decoration: none;
transition: color 0.2s ease-out;
-moz-transition: color 0.2s ease-out;
-o-transition: color 0.2s ease-out;
-webkit-transition: color 0.2s ease-out;
}
h1, h2, h3, h4, h5, h6 {
margin: 0;
padding: 0;
}
.sectionheader {
color: #1046a9;
}
p {
font-size: 12px;
}
.content {
padding: 20px 0 20px 0;
}
a:hover {
color: #5bbb15;
text-decoration: none;
transition: color 0.2s ease-out;
-moz-transition: color 0.2s ease-out;
-o-transition: color 0.2s ease-out;
-webkit-transition: color 0.2s ease-out;
}
body {
background-image: url('../images/body_bg.png');
background-repeat: repeat;
}
.main {
margin: auto;
padding: 20px 0 10px 0;
width: 960px;
}
#logo {
background-image: url('../images/logo_3.png');
float: left;
height: 100px;
width: 148px;
margin-bottom: -43px;
}
#login {
float: right;
font-size: 12px;
list-style-type: none;
text-align: right;
}
#login li {
display: inline;
padding-left: 20px;
}
.clear {
height: 1px;
width: 100%;
}
#menu, #menu ul, #menu li, #menu a {
margin: 0;
padding: 0;
border: none;
outline: none;
}
#menu {
height: 40px;
width: 380px;
float: right;
margin-bottom: 20px;
background: #4c4e5a;
background: -webkit-linear-gradient(top, #4c4e5a 0%,#2c2d33 100%);
background: -moz-linear-gradient(top, #4c4e5a 0%,#2c2d33 100%);
background: -o-linear-gradient(top, #4c4e5a 0%,#2c2d33 100%);
background: -ms-linear-gradient(top, #4c4e5a 0%,#2c2d33 100%);
background: linear-gradient(top, #4c4e5a 0%,#2c2d33 100%);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
#menu li {
position: relative;
list-style: none;
float: left;
display: block;
height: 40px;
}
#menu ul { display: none; }
#menu li a {
display: block;
padding: 0 14px;
margin: 6px 0;
line-height: 28px;
text-decoration: none;
border-left: 1px solid #393942;
border-right: 1px solid #4f5058;
font-family: Helvetica, Arial, sans-serif;
font-weight: bold;
font-size: 13px;
color: #f3f3f3;
text-shadow: 1px 1px 1px rgba(0,0,0,.6);
-webkit-transition: color .2s ease-in-out;
-moz-transition: color .2s ease-in-out;
-o-transition: color .2s ease-in-out;
-ms-transition: color .2s ease-in-out;
transition: color .2s ease-in-out;
}
#menu li:first-child a { border-left: none; }
#menu li:last-child a{ border-right: none; }
#menu li:hover > a { color: #78fe3f !important; }
#menu ul {
position: absolute;
top: 40px;
left: 0;
opacity: 0;
background: #1f2024;
-webkit-border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
-webkit-transition: opacity .25s ease .1s;
-moz-transition: opacity .25s ease .1s;
-o-transition: opacity .25s ease .1s;
-ms-transition: opacity .25s ease .1s;
transition: opacity .25s ease .1s;
}
#menu li:hover > ul { opacity: 1; }
#menu ul li {
height: 0;
overflow: hidden;
padding: 0;
-webkit-transition: height .25s ease .1s;
-moz-transition: height .25s ease .1s;
-o-transition: height .25s ease .1s;
-ms-transition: height .25s ease .1s;
transition: height .25s ease .1s;
}
#menu li:hover > ul li {
height: 36px;
overflow: visible;
padding: 0;
}
#menu ul li a {
width: 100px;
padding: 4px 0 4px 40px;
margin: 0;
border: none;
border-bottom: 1px solid #353539;
}
#menu ul li:last-child a { border: none; }
footer { border-bottom: solid 1px #5bbb15; border-top: solid 1px #5bbb15; }
footer small { font-size: 12px;}
#contact {
float: right;
margin: 20px 0 20px 0;
}
label {
font-family: Helvetica, Arial, sans-serif;
color: #404040;
font-size: 14px;
margin: 0;
padding: 0;
text-align: right;
}
.TextInput {
width: 300px;
border-radius: 4px;
margin-left: 10px;
color: #bfbfbf;
}
.EmailInput {
width: 300px;
border-radius: 4px;
margin-left: 10px;
color: #bfbfbf;
}
.button {
width: 308px;
float: right;
}
.imageset {
margin: 30px 4px 0 0;
border: none;
}
#iowbg {
background: #b3b3b3;
width: 920px;
height: 250px;
padding: 20px;
}
#iowimage {
float: left;
position: relative;
}
.productname, .productdesc, .productprice {
position: relative;
text-align: left;
margin-left: 240px;
margin-bottom: 2px;
}
.productname {
margin-top: 26px;
}
.productprice {
width: 67px;
padding: 2px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
float: left;
position: absolute;
margin-left: 240px;
}
#discountsitem{
float: left;
width: 320px;
margin: auto;
padding: 0;
}
.discountdesc {
width: 200px;
font-size: 12px;
line-height: 14px;
}
.regularprice {
text-decoration: line-through;
color: #900;
float: left;
margin-right: 10px;
}
.discountprice {
color: #5bbb15;
float: left;
}
.productsection {
width: 920px;
padding: 20px;
margin: 20px 0 20px 0 auto;
}
I have two navs and one of them is working just fine. Does anyone know how to fix this?
As far as I can tell, there's nothing visibly wrong with the HTML. It might be the CSS, but there's a small problem - you kinda didn't post it. Providing it would be much appreciated!
EDIT: OK, the two navbars I'm assuming you're referring two in your question are #login and #menu. I ran the HTML (with the CSS attached in the header as a style tag) and both of the navbars render fine in both Chrome and Firefox. I even screenshot it to make sure I wasn't dreaming. I would post the screenshot, but again, reputation deficit.
My only guess at right now would be that something's wrong with your Firefox. Unless, of course, I'm misunderstanding you completely. Then I'm gonna blame your communication skills. :P