Scrolling issues on Mobile - html

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>

Related

gradient color to input field

just a relative simple question I think but can't find what to change. I you click to this input field you get a gradient color on the bottom of the field. I need to add something to get a red gradient color to the bottom when the page is loaded (so not clicked), when there is clicked the gradient changes to that yellow to pink gradient. thanks in advance!
* {
margin: 0px;
padding: 0px;
box-sizing: border-box;
}
body, html {
height: 100%;
font-family: Poppins-Regular, sans-serif;
}
/*---------------------------------------------*/
a {
font-family: Poppins-Regular;
font-size: 14px;
line-height: 1.7;
color: #666666;
margin: 0px;
transition: all 0.4s;
-webkit-transition: all 0.4s;
-o-transition: all 0.4s;
-moz-transition: all 0.4s;
}
a:focus {
outline: none !important;
}
a:hover {
text-decoration: none;
color: #6a7dfe;
color: -webkit-linear-gradient(left, #21d4fd, #b721ff);
color: -o-linear-gradient(left, #21d4fd, #b721ff);
color: -moz-linear-gradient(left, #21d4fd, #b721ff);
color: linear-gradient(left, #21d4fd, #b721ff);
}
/*---------------------------------------------*/
h1,h2,h3,h4,h5,h6 {
margin: 0px;
}
p {
font-family: Poppins-Regular;
font-size: 14px;
line-height: 1.7;
color: #666666;
margin: 0px;
}
ul, li {
margin: 0px;
list-style-type: none;
}
/*---------------------------------------------*/
input {
outline: none;
border: none;
}
textarea {
outline: none;
border: none;
}
textarea:focus, input:focus {
border-color: transparent !important;
}
/*------------------------------------------------------------------
[ Input ]*/
.wrap-input100 {
width: 100%;
position: relative;
border-bottom: 2px solid #adadad;
margin-bottom: 37px;
}
.input100 {
font-family: Poppins-Regular;
font-size: 15px;
color: #555555;
line-height: 1.2;
display: block;
width: 100%;
height: 45px;
background: transparent;
padding: 0 5px;
}
/*---------------------------------------------*/
.focus-input100 {
position: absolute;
display: block;
width: 100%;
height: 100%;
top: 0;
left: 0;
pointer-events: none;
}
.focus-input100::before {
content: "";
display: block;
position: absolute;
bottom: -2px;
left: 0;
width: 0;
height: 2px;
-webkit-transition: all 0.4s;
-o-transition: all 0.4s;
-moz-transition: all 0.4s;
transition: all 0.4s;
background: #6a7dfe;
background: -webkit-linear-gradient(left, yellow, #b721ff);
background: -o-linear-gradient(left, yellow, #b721ff);
background: -moz-linear-gradient(left, yellow, #b721ff);
background: linear-gradient(left, yellow, #b721ff);
}
.focus-input100::after {
font-family: Poppins-Regular;
font-size: 15px;
color: #999999;
line-height: 1.2;
content: attr(data-placeholder);
display: block;
width: 100%;
position: absolute;
top: 16px;
left: 0px;
padding-left: 5px;
-webkit-transition: all 0.4s;
-o-transition: all 0.4s;
-moz-transition: all 0.4s;
transition: all 0.4s;
}
.input100:focus + .focus-input100::after {
top: -15px;
}
.input100:focus + .focus-input100::before {
width: 100%;
}
.has-val.input100 + .focus-input100::after {
top: -15px;
}
.has-val.input100 + .focus-input100::before {
width: 100%;
}
/*------------------------------------------------------------------
[ Responsive ]*/
#media (max-width: 576px) {
.wrap-login100 {
padding: 77px 15px 33px 15px;
}
}
/*------------------------------------------------------------------
[ Alert validate ]*/
.validate-input {
position: relative;
}
.alert-validate::before {
content: attr(data-validate);
position: absolute;
max-width: 70%;
background-color: #fff;
border: 1px solid #c80000;
border-radius: 2px;
padding: 4px 25px 4px 10px;
top: 50%;
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-ms-transform: translateY(-50%);
-o-transform: translateY(-50%);
transform: translateY(-50%);
right: 0px;
pointer-events: none;
font-family: Poppins-Regular;
color: #c80000;
font-size: 13px;
line-height: 1.4;
text-align: left;
visibility: hidden;
opacity: 0;
-webkit-transition: opacity 0.4s;
-o-transition: opacity 0.4s;
-moz-transition: opacity 0.4s;
transition: opacity 0.4s;
}
.alert-validate::after {
content: "\f06a";
font-family: FontAwesome;
font-size: 16px;
color: #c80000;
display: block;
position: absolute;
background-color: #fff;
top: 50%;
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-ms-transform: translateY(-50%);
-o-transform: translateY(-50%);
transform: translateY(-50%);
right: 5px;
}
.alert-validate:hover:before {
visibility: visible;
opacity: 1;
}
.limiter {
width: 20%;
padding-top: 5%;
}
<div class="limiter">
<div class="wrap-input100 validate-input">
<span class="btn-show-pass">
<i class="zmdi zmdi-eye"></i>
</span>
<input class="input100" type="password" name="password">
<span class="focus-input100" data-placeholder="wachtwoord"></span>
</div>
</div>
Add CSS border-image and border-image-slice properties to the .wrap-input100 class
.wrap-input100 {
width: 100%;
position: relative;
margin-bottom: 37px;
border-bottom: 2px solid transparent;
border-image: linear-gradient(to right, #b721ff 0%, red 100%);
border-image-slice: 1;
}

How to block text/form in a crossfading background with image?

in this authentication page i want to do a background with 5 images rolling in 3 seconds, it works but also my auth form appears between every image and disappear when other image appear.
here the Fiddle with my html and css just to show you the code better, it doesn't work there because i have the images in my local path.
HTML:
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1"/>
</head>
<body>
<div class="center">
<h1>Benvenuto!</h1>
<h3>Accedi con le tue credenziali</h3>
</div>
<form style="background-color: white">
<div class="group">
<input [(ngModel)]="user.email" name="email" type="email"><span class="highlight"></span><span
class="bar"></span>
<label>Email</label>
</div>
<div class="group">
<input [(ngModel)]="user.password" name="password" type="password"><span
class="highlight"></span><span
class="bar"></span>
<label>Password</label>
</div>
<button (click)="signin()" type="button" class="button buttonBlue">Accedi
<div class="ripples buttonRipples"><span class="ripplesCircle"></span>
</div>
</button>
</form>
<div class="crossfade">
<figure></figure>
<figure></figure>
<figure></figure>
<figure></figure>
<figure></figure>
</div>
</body>
</html>
CSS:
.crossfade > figure {
animation: imageAnimation 15s linear infinite 0s;
backface-visibility: hidden;
background-size: cover;
background-position: center center;
color: transparent;
height: 100%;
left: 0px;
opacity: 0;
position: fixed;
top: 0px;
width: 100%;
z-index: 0;
}
.crossfade > figure:nth-child(1) { background-image: url('../../../img/login/bath-bathroom-candlelight-3188.jpg'); }
.crossfade > figure:nth-child(2) {
animation-delay: 3s;
background-image: url('../../../img/login/bath-blur-brush-275765.jpg');
}
.crossfade > figure:nth-child(3) {
animation-delay: 6s;
background-image: url('../../../img/login/beauty-face-massage-56884.jpg');
}
.crossfade > figure:nth-child(4) {
animation-delay: 9s;
background-image: url('../../../img/login/bed-bedroom-blanket-275845.jpg');
}
.crossfade > figure:nth-child(5) {
animation-delay: 12s;
background-image: url('../../../img/login/body-massage-relax-7700.jpg');
}
#keyframes
imageAnimation { 0% {
animation-timing-function: ease-in;
opacity: 0;
}
8% {
animation-timing-function: ease-out;
opacity: 1;
}
17% {
opacity: 1
}
25% {
opacity: 0
}
100% {
opacity: 0
}
}
* { box-sizing:border-box; }
body {
font-family: Helvetica;
background: #eee;
-webkit-font-smoothing: antialiased;
}
hgroup {
text-align:center;
margin-top: 4em;
}
h1, h3 { font-weight: 300; }
h1 { color: #636363; }
h3 { color: #4a89dc; }
.center{
width: 380px;
margin: 4em auto;
padding: 3em 2em 2em 2em;
}
form {
width: 380px;
margin: 4em auto;
padding: 3em 2em 2em 2em;
background: #fafafa;
border: 1px solid #ebebeb;
box-shadow: rgba(0,0,0,0.14902) 0px 1px 1px 0px,rgba(0,0,0,0.09804) 0px 1px 2px 0px;
}
.group {
position: relative;
margin-bottom: 45px;
}
input {
font-size: 18px;
padding: 10px 10px 10px 5px;
-webkit-appearance: none;
display: block;
background: #fafafa;
color: #636363;
width: 100%;
border: none;
border-radius: 0;
border-bottom: 1px solid #757575;
}
input:focus { outline: none; }
/*/* Label */
label {
color: #999;
font-size: 18px;
font-weight: normal;
position: absolute;
pointer-events: none;
left: 5px;
top: 10px;
transition: all 0.2s ease;
}
/*/* active */
input:focus ~ label, input.used ~ label {
top: -20px;
transform: scale(.75); left: -2px;
/* font-size: 14px; */
color: #4a89dc;
}
/*/* Underline */
.bar {
position: relative;
display: block;
width: 100%;
}
.bar:before, .bar:after {
content: '';
height: 2px;
width: 0;
bottom: 1px;
position: absolute;
background: #4a89dc;
transition: all 0.2s ease;
}
.bar:before { left: 50%; }
.bar:after { right: 50%; }
/* active */
input:focus ~ .bar:before, input:focus ~ .bar:after { width: 50%; }
/* Highlight */
.highlight {
position: absolute;
height: 60%;
width: 100px;
top: 25%;
left: 0;
pointer-events: none;
opacity: 0.5;
}
/* active */
input:focus ~ .highlight {
animation: inputHighlighter 0.3s ease;
}
/* Animations */
#keyframes inputHighlighter {
from { background: #4a89dc; }
to { width: 0; background: transparent; }
}
/* Button */
.button {
position: relative;
display: inline-block;
padding: 12px 24px;
margin: .3em 0 1em 0;
width: 100%;
vertical-align: middle;
color: #fff;
font-size: 16px;
line-height: 20px;
-webkit-font-smoothing: antialiased;
text-align: center;
letter-spacing: 1px;
background: transparent;
border: 0;
border-bottom: 2px solid #3160B6;
cursor: pointer;
transition: all 0.15s ease;
}
.button:focus { outline: 0; }
/* Button modifiers */
.buttonBlue {
background: #4a89dc;
text-shadow: 1px 1px 0 rgba(39, 110, 204, .5);
}
.buttonBlue:hover { background: #357bd8; }
/* Ripples container */
.ripples {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
background: transparent;
}
/* Ripples circle */
.ripplesCircle {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
opacity: 0;
width: 0;
height: 0;
border-radius: 50%;
background: rgba(255, 255, 255, 0.25);
}
.ripples.is-active .ripplesCircle {
animation: ripples .4s ease-in;
}
/* Ripples animation */
#keyframes ripples {
0% { opacity: 0; }
25% { opacity: 1; }
100% {
width: 200%;
padding-bottom: 200%;
opacity: 0;
}
}
footer { text-align: center; }
footer p {
color: #888;
font-size: 13px;
letter-spacing: .4px;
}
footer a {
color: #4a89dc;
text-decoration: none;
transition: all .2s ease;
}
footer a:hover {
color: #666;
text-decoration: underline;
}
footer img {
width: 80px;
transition: all .2s ease;
}
footer img:hover { opacity: .83; }
footer img:focus , footer a:focus { outline: none; }
<!-- slideshow bckg -->
* {
padding: 0;
margin: 0
}
one solution is to add a div section to your crossfade too!
You just need to add the div section in your css and give the div a chance to show and disappear
.crossfade > figure {
animation: imageAnimation 18s linear infinite 0s;
backface-visibility: hidden;
background-size: cover;
background-position: center center;
color: transparent;
height: 100%;
left: 0px;
opacity: 0;
position: fixed;
top: 0px;
width: 100%;
z-index: 0;
}
.crossfade > div {
animation: imageAnimation 15s linear infinite 0s;
backface-visibility: hidden;
background-size: cover;
background-position: center center;
color: transparent;
height: 100%;
left: 0px;
opacity: 0;
position: fixed;
top: 0px;
width: 100%;
z-index: 0;
}
.crossfade > figure:nth-child(1) { background-image: url('https://www.uncommongoods.com/images/items/26500/26530_1_1200px.jpg'); }
.crossfade > figure:nth-child(2) {
animation-delay: 3s;
background-image: url('https://img1.southernliving.timeinc.net/sites/default/files/styles/4_3_horizontal_-_1200x900/public/image/2018/01/main/duck.jpg?itok=CHWo5-3d&1515187196');
}
.crossfade > figure:nth-child(3) {
animation-delay: 6s;
background-image: url('https://images-eu.ssl-images-amazon.com/images/I/41sfz8dKX1L._SL500_AC_SS350_.jpg');
}
.crossfade > figure:nth-child(4) {
animation-delay: 9s;
background-image: url('https://deltawaterfowl.org/wp-content/uploads/2017/04/mallard-web.jpg');
}
.crossfade > figure:nth-child(5) {
animation-delay: 12s;
background-image: url('https://upload.wikimedia.org/wikipedia/commons/2/24/Male_mallard_duck_2.jpg');
}
.crossfade > div:nth-child(6) {
animation-delay: 15s;
}
#keyframes
imageAnimation { 0% {
animation-timing-function: ease-in;
opacity: 0;
}
8% {
animation-timing-function: ease-out;
opacity: 1;
}
17% {
opacity: 1
}
25% {
opacity: 0
}
100% {
opacity: 0
}
}
* { box-sizing:border-box; }
body {
font-family: Helvetica;
background: #eee;
-webkit-font-smoothing: antialiased;
}
hgroup {
text-align:center;
margin-top: 4em;
}
h1, h3 { font-weight: 300; }
h1 { color: #636363; }
h3 { color: #4a89dc; }
.center{
width: 380px;
margin: 4em auto;
padding: 3em 2em 2em 2em;
}
form {
width: 380px;
margin: 4em auto;
padding: 3em 2em 2em 2em;
background: #fafafa;
border: 1px solid #ebebeb;
box-shadow: rgba(0,0,0,0.14902) 0px 1px 1px 0px,rgba(0,0,0,0.09804) 0px 1px 2px 0px;
}
.group {
position: relative;
margin-bottom: 45px;
}
input {
font-size: 18px;
padding: 10px 10px 10px 5px;
-webkit-appearance: none;
display: block;
background: #fafafa;
color: #636363;
width: 100%;
border: none;
border-radius: 0;
border-bottom: 1px solid #757575;
}
input:focus { outline: none; }
/*/* Label */
label {
color: #999;
font-size: 18px;
font-weight: normal;
position: absolute;
pointer-events: none;
left: 5px;
top: 10px;
transition: all 0.2s ease;
}
/*/* active */
input:focus ~ label, input.used ~ label {
top: -20px;
transform: scale(.75); left: -2px;
/* font-size: 14px; */
color: #4a89dc;
}
/*/* Underline */
.bar {
position: relative;
display: block;
width: 100%;
}
.bar:before, .bar:after {
content: '';
height: 2px;
width: 0;
bottom: 1px;
position: absolute;
background: #4a89dc;
transition: all 0.2s ease;
}
.bar:before { left: 50%; }
.bar:after { right: 50%; }
/* active */
input:focus ~ .bar:before, input:focus ~ .bar:after { width: 50%; }
/* Highlight */
.highlight {
position: absolute;
height: 60%;
width: 100px;
top: 25%;
left: 0;
pointer-events: none;
opacity: 0.5;
}
/* active */
input:focus ~ .highlight {
animation: inputHighlighter 0.3s ease;
}
/* Animations */
#keyframes inputHighlighter {
from { background: #4a89dc; }
to { width: 0; background: transparent; }
}
/* Button */
.button {
position: relative;
display: inline-block;
padding: 12px 24px;
margin: .3em 0 1em 0;
width: 100%;
vertical-align: middle;
color: #fff;
font-size: 16px;
line-height: 20px;
-webkit-font-smoothing: antialiased;
text-align: center;
letter-spacing: 1px;
background: transparent;
border: 0;
border-bottom: 2px solid #3160B6;
cursor: pointer;
transition: all 0.15s ease;
}
.button:focus { outline: 0; }
/* Button modifiers */
.buttonBlue {
background: #4a89dc;
text-shadow: 1px 1px 0 rgba(39, 110, 204, .5);
}
.buttonBlue:hover { background: #357bd8; }
/* Ripples container */
.ripples {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
background: transparent;
}
/* Ripples circle */
.ripplesCircle {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
opacity: 0;
width: 0;
height: 0;
border-radius: 50%;
background: rgba(255, 255, 255, 0.25);
}
.ripples.is-active .ripplesCircle {
animation: ripples .4s ease-in;
}
/* Ripples animation */
#keyframes ripples {
0% { opacity: 0; }
25% { opacity: 1; }
100% {
width: 200%;
padding-bottom: 200%;
opacity: 0;
}
}
footer { text-align: center; }
footer p {
color: #888;
font-size: 13px;
letter-spacing: .4px;
}
footer a {
color: #4a89dc;
text-decoration: none;
transition: all .2s ease;
}
footer a:hover {
color: #666;
text-decoration: underline;
}
footer img {
width: 80px;
transition: all .2s ease;
}
footer img:hover { opacity: .83; }
footer img:focus , footer a:focus { outline: none; }
<!-- slideshow bckg -->
* {
padding: 0;
margin: 0
}
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1"/>
</head>
<body>
<div class="crossfade">
<figure></figure>
<figure></figure>
<figure></figure>
<figure></figure>
<figure></figure>
<div class="center">
<h1>Benvenuto!</h1>
<h3>Accedi con le tue credenziali</h3>
</div>
</div>
</body>
</html>
Have at it and goodluck :)

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>

issue with z-index and dropdown menu IE11

I have an issue with my dropdown menu. I have a table and at the end of each row i have a dropdown menu like that :
When i hover the menu on every browser i got this :
Except on IE11 :
Here is my CSS :
#dropdown_classe {
margin: 10px 0 20px 0;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
}
#dropdown_classe .wrapper {
display: inline-block;
width: 180px;
margin: 0 10px 0 0;
height: 20px;
position: relative;
}
#dropdown_classe .parent {
height: 100%;
width: 100%;
display: block;
cursor: pointer;
line-height: 30px;
height: 30px;
border-radius: 5px;
background: #F9F9F9;
border: 1px solid #AAA;
border-bottom: 1px solid #777;
color: #282D31;
font-weight: bold;
font-size: 13px;
z-index: 2;
position: relative;
-webkit-transition: border-radius .1s linear, background .1s linear, z-index 0s linear;
-webkit-transition-delay: .8s;
text-align: center;
}
#dropdown_classe .parent:hover,
#dropdown_classe .content:hover ~ .parent {
background: #fff;
-webkit-transition-delay: 0s, 0s, 0s;
}
#dropdown_classe .content:hover ~ .parent {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
z-index: 0;
}
#dropdown_classe .content {
position: absolute;
top: 0;
display: block;
z-index: 1;
height: 0;
width: 180px;
padding-top: 30px;
-webkit-transition: height .3s ease;
-webkit-transition-delay: .2s;
border: 1px solid #777;
border-radius: 5px;
box-shadow: 0 1px 2px rgba(0,0,0,.4);
}
#dropdown_classe .wrapper:hover .content {
height: 253px;
z-index: 3;
-webkit-transition-delay: 0s;
}
#dropdown_classe .content:hover {
height: 253px;
z-index: 3;
-webkit-transition-delay: 0s;
}
#dropdown_classe .content ul {
background: #fff;
margin: 0;
padding: 0;
overflow: hidden;
height: 100%;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
}
#dropdown_classe .content ul a {
text-decoration: none;
}
#dropdown_classe .content li:hover {
background: #eee;
color: #333;
}
#dropdown_classe .content li {
list-style: none;
text-align: left;
color: #888;
font-size: 13px;
line-height: 30px;
height: 30px;
padding-left: 10px;
border-top: 1px solid #ccc;
}
#dropdown_classe .content li:last-of-type {
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
}
If you have any advice please let me know
Ctbs1
I fixed this issue with this :
<meta http-equiv="X-UA-Compatible" content="IE=edge">

CSS unknown property "transform"

I am having some problems with my stylesheet. I am trying to do some funny hover effects, but somehow I can't use transform. Can anyone help me? The error occurs down below the comment "view one".
HTML:
<html xmlns="http://www.w3.org/1999/xhtml">
<link rel="stylesheet" href="stylesheets/style.css" type="text/css" media="screen" />
<head>
<title>thomasteilmann.dk</title>
</head>
<body>
<div class="header">
<h1><img src="teilmann.jpg" alt="Sick Logo" /></a></h1>
Copyright Thomas Teilmann
</div>
<div id="content">
<div class="view view-first">
<img src="images/cosmic_art_icon.jpg"/>
<div class="mask">
<h2>Cosmic Art</h2>
<p>A galleri of cosmic art made in Photoshop</p>
View
</div>
</div>
</body>
</html>
CSS:
body {
background: #21211f;
width: 902px;
font-family: helvetica, arial, sans-serif;
margin: 0 auto;
padding: 40px 0 0 0;
}
.header{
position: absolute;
width: 185px;
}
h1 img{
float: left;
padding: 0;
margin: 0;
}
#navbar ul {
position: absolute;
margin-left: 190px;
padding: 5px;
list-style-type: none;
text-align: center;
background-color: white;
width: 692px;
margin-top: 65px;
}
#navbar ul li {
display: inline;
}
#navbar ul li a {
text-decoration: none;
padding: .2em 1em;
font-family: Georgia, times, serif;
color: black;
background-color: white;
}
#navbar ul li a:hover {
color: black;
background-color: #fff;
}
#content{
width: 612px;
background: #466287 url(images/corner.jpg) top right no-repeat;
line-height: 22px;
font-size: 18px;
font-family: Georgia, times, serif;
margin: 0 0 10px 0;
float: left;
color: #ffffff;
margin-left: 190px;
margin-top: 100px;
padding: 20px 60px 20px 30px;
}
img {
border: none;
}
.form{
margin: 15px 0;
padding: 20px 0 20px 0;
background: url(form1.jpg) no-repeat;
font-family: helvetica, arial, sans-serif;
}
/*
* View
*/
.view {
width: 279px;
height: 198px;
margin: 10px;
float: left;
border: 5px solid white;
overflow: hidden;
position: relative;
text-align: center;
box-shadow: 1px 2px 2px #e6e6e6;
cursor: default;
background: #fff url(../images/bgimg.jpg) no-repeat center center;
}
.view .mask, .view .content {
width: 279px;
height: 198px;
position: absolute;
overflow: hidden;
top: 0;
left: 0;
}
.view img {
display: block;
position: relative;
}
.view h2 {
text-transform: uppercase;
color: #fff;
text-align: center;
position: relative;
font-size: 17px;
padding: 10px;
background: rgba(0, 0, 0, 0.8);
margin: 20px 0 0 0;
}
.view p {
font-family: Georgia, serif;
font-style: italic;
font-size: 12px;
position: relative;
color: #fff;
padding: 10px 20px 20px;
text-align: center;
}
.view a.info {
display: inline-block;
text-decoration: none;
padding: 7px 14px;
background: #000;
color: #fff;
text-transform: uppercase;
box-shadow: 0 0 1px #000;
}
.view a.info:hover {
box-shadow: 0 0 5px #000;
}
/* View one
*/
.view-first img {
transition: all 0.2s linear;
}
.view-first .mask {
opacity: 0;
background-color: rgba(219,127,8, 0.7);
transition: all 0.4s ease-in-out;
}
.view-first h2 {
transform: translateY(-100px);
opacity: 0;
transition: all 0.2s ease-in-out;
}
.view-first p {
transform: translateY(100px);
opacity: 0;
transition: all 0.2s linear;
}
.view-first a.info{
opacity: 0;
transition: all 0.2s ease-in-out;
}
.view-first:hover img {
transform: scale(1.1);
}
.view-first:hover .mask {
opacity: 1;
}
.view-first:hover h2,
.view-first:hover p,
.view-first:hover a.info {
opacity: 1;
transform: translateY(0px);
}
.view-first:hover p {
transition-delay: 0.1s;
}
.view-first:hover a.info {
transition-delay: 0.2s;
}
transform isn't a standard yet, so no browser supports it at present.
However, some browsers support vendor extensions based on the draft:
-ms-transform in Internet Explorer 9
-moz-transform in Mozilla browsers (most notably Firefox)
-webkit-transform in Webkit browsers (Chrome, Safari, etc.)
-o-transform in Opera
Possibly others, I don't know.
just use this css inside your css code.Remember transform does not work in all browsers.
.view-first:hover {
transform: rotate(30deg);
-ms-transform: rotate(30deg); /* IE 9 */
-webkit-transform: rotate(30deg); /* Safari and Chrome */
-o-transform: rotate(30deg); /* Opera */
-moz-transform: rotate(30deg); /* Firefox */
}
You'll probably need to use vendor specific styles for the transitions, for example:
#id_of_element {
-webkit-transition: all 0.2s linear;
-moz-transition: all 0.2s linear;
-o-transition: all 0.2s linear;
-ms-transition: all 0.2s linear;
transition: all 0.2s linear;
}
You can read more about transitions and transformations here - http://css3.bradshawenterprises.com/