Flexbox Contents is Shifting on Safari Browser - html

I've tried using AutoPrefixer in case it was anything related to webkits with Flexbox, but it didn't make any difference.
Here's my CSS:
#title {
text-align: center;
font: 50px/1.3 "Oleo Script", Helvetica, sans-serif;
color: #2b2b2b;
text-shadow: 2.3px 2px 0px rgb(255, 255, 255, 0.8);
color: rgba(250, 57, 57, 0.932);
}
.container-1 {
margin: auto;
display: flex;
border-style: solid;
border-radius: 8%;
background-color: rgba(250, 57, 57, 0.932);
width: 475px;
height: 500px;
align-items: flex-end;
flex-wrap: wrap;
}
.container-1 div {
padding: 11px;
}
.session {
flex: 2;
order: 2; /*Remember when using order, all elements START at order: 0; */
font: 1rem "Oleo Script", Helvetica, sans-serif;
}
#sessionTimer {
font-size: 1.10em;
font-weight: bolder;
}
.minusSession {
flex: 1;
order: 1;
}
#minusSessionButton {
width: 2rem;
height: 2rem;
font-size: 1rem;
outline: none;
color: white;
background-color: rgb(216, 211, 211);
margin-left: 1rem;
}
.plusSession {
flex: 1;
order: 3;
margin-left: -1rem;
}
#plusSessionButton {
width: 2rem;
height: 2rem;
font-size: 1rem;
outline: none;
color: white;
background-color: rgb(216, 211, 211);
margin-left: 1rem;
}
.break {
flex: 2;
order: 5;
font: 1rem "Oleo Script", Helvetica, sans-serif;
}
#breakTimer {
font-size: 1.10em;
font-weight: bolder;
}
.minusBreak {
flex: 1;
order: 4;
margin-left: 3rem;
}
#minusBreakButton {
width: 2rem;
height: 2rem;
font-size: 1rem;
outline: none;
color: white;
background-color: rgb(216, 211, 211);
}
.plusBreak {
flex: 1;
order: 6;
}
#plusBreakButton {
width: 2rem;
height: 2rem;
font-size: 1rem;
outline: none;
color: white;
background-color: rgb(216, 211, 211);
margin-left: 0.1rem;
margin-right: 1rem;
}
.pause {
flex: 1;
order: 8;
}
#pauseButton {
width: 80px;
height: 60px;
background-color: rgb(134, 231, 89);
color: white;
outline: none;
font: 400 20px "Oleo Script", Helvetica, sans-serif;
margin-left: 22px;
}
.timer {
flex: 2;
order: 9; /* 8 */
text-align: center;
font: 400 30px "Oleo Script", Helvetica, sans-serif;
}
h1 {
margin-top: 5px;
margin-bottom: 5px;
}
.stop {
flex: 1;
order: 10; /* 9 */
}
#stopButton {
width: 80px;
height: 60px;
font: 400 18px "Oleo Script", Helvetica, sans-serif;
background-color: rgb(134, 231, 89);
color: white;
outline: none;
}
.start {
flex: 4;
order: 11; /*10 */
text-align: center;
}
#startButton {
text-align: center;
background-color: rgb(134, 231, 89);
color: white;
width: 250px;
height: 55px;
font: 32px "Oleo Script", Helvetica, sans-serif;
font-style: italic;
outline: none;
}
.sessionTitle {
flex: 1;
order: 7;
flex-basis: 100%;
text-align: center;
font: 400 30px "Oleo Script", Helvetica, sans-serif;
}
.breakTitle {
flex: 1;
order: 7;
flex-basis: 100%;
text-align: center;
font: 400 30px "Oleo Script", Helvetica, sans-serif;
}
button {
transition: filter 100ms ease-in-out;
}
button:hover {
cursor: pointer;
filter: brightness(0.9);
}
body {
background: rgb(180, 227, 145); /* Old browsers */
background: -moz-linear-gradient(
top,
rgba(180, 227, 145, 1) 0%,
rgba(97, 196, 25, 1) 50%,
rgba(180, 227, 145, 1) 100%
); /* FF3.6-15 */
background: -webkit-linear-gradient(
top,
rgba(180, 227, 145, 1) 0%,
rgba(97, 196, 25, 1) 50%,
rgba(180, 227, 145, 1) 100%
); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(
to bottom,
rgba(180, 227, 145, 1) 0%,
rgba(97, 196, 25, 1) 50%,
rgba(180, 227, 145, 1) 100%
); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b4e391', endColorstr='#b4e391',GradientType=0 ); /* IE6-9 */
color: white;
}
Here's the project of what it should look like on Chrome/Firefox:
https://kfollen93.github.io/Pomodoro-Timer/
However, if you open it in Safari, you will notice the Break " + " symbol has been bumped down a row, which results in the following rows being pushed down one as well.

I increased the width and height by 20px and it works now.

Related

link button has an underline that cannot be removed, and icon turns red when clicked

I made a "button" well... not really, I made a link that redirects the user to my 'whatever' page or whatever.
problem is, it has an annoyying underline that cannot be removed even when i try puttin in CSS text-decoration: none;
why is it happening?
how can i remove it?
also, whenever i click on the button, the LinkedIn icon turns red.. the button is purple and it makes it ugly.. how can i remove the red color when clicked?
when i am hovering next to the box in the 'peticide' chrome extention, i noticed a red line is it related somehow?
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.title h1 {
font-size: 36px;
font-family: "Lato", sans-serif;
margin-top: 90px;
margin-left: 860px;
margin-right: 10px;
text-align: center;
/* !!!! !!!! Styling the text and giving it gradient *מדרון* !!!! !!!!*/
color: #ffffff;
background: -webkit-linear-gradient(#eee, #333);
-webkit-background-clip:text;
-webkit-text-fill-color: transparent;
text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
/* Make sure text is infront of background images */
display: block;
position: relative;
z-index: 3;
}
#keyframes move-twink-back {
from {
background-position: 0 0;
}
to {
background-position: -10000px 5000px;
}
}
#keyframes move-clouds-back {
from {
background-position: 0 0;
}
to {
background-position: 10000px 0;
}
}
.stars,
.twinkling,
.clouds {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
display: block;
}
.stars {
background: #000 url(stars.png) repeat top center;
z-index: 0;
}
.twinkling {
background: transparent url(twinkling.png) repeat top center;
z-index: 1;
animation: move-twink-back 200s linear infinite;
}
.clouds {
background: transparent url(clouds.png) repeat top center;
z-index: 2;
opacity: 0.4;
animation: move-clouds-back 200s linear infinite;
}
.secondarytitle,
h2 {
font-size: 63px;
font-weight: 500;
letter-spacing: 5px;
cursor: pointer;
font-family: "Lato", sans-serif;
margin-top: 90px;
margin-left: 705px;
margin-right: 10px;
text-align: center;
color: #ffffff;
background: -webkit-linear-gradient(#eee, #333);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
display: block;
position: absolute;
z-index: 3;
}
body {
display: flex;
min-height: 100vh;
}
.secondarytitle,
h2 span {
transition: 0.5s;
}
.secondarytitle,
h2:hover span:nth-child(1) {
margin-right: 28px;
}
.secondarytitle,
h2:hover span:nth-child(2)::after {
margin-right: 10px;
}
.secondarytitle,
h2:hover span:nth-child(2)::after {
content: "";
margin-left: 10px;
}
.secondarytitle,
h2:hover span {
color: #fff;
text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 40px #fff, 0 0 80px #fff,
0 0 120px #fff;
}
table,
tr,
td,
th{
color: #ffffff;
background: -webkit-linear-gradient(#eee, #333);
font-family: "Lato", sans-serif;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
z-index: 2;
position: absolute;
font-size: 24px;
font-weight: 600;
}
.tabledata{
top: 400px;
left: 231px;
width: 1200px;
height: 550px;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
z-index: 2;
}
.button{
font-size: 27px;
font-weight: 800px;
top: 896px;
left: 1233px;
width: 248px;
height: 46px;
color: #ffffff;
letter-spacing: 4px;
background: -webkit-linear-gradient(#eee, #333);
font-family: "consolas", sans-serif;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
z-index: 3;
position: absolute;
transition: 1.7s;
text-decoration: none;
overflow: hidden;
text-transform: uppercase;
display: inline-block;
cursor: pointer;
}
.button:hover
{
color: #ffffff;
background: #ffffff;
box-shadow: 0 0 10px #ffffff, 0 0 40px #ffffff, 0 0 80px #ffffff;
transition-delay: 0.05s;
}
.secondaryButton{
font-size: 27px;
font-weight: 800px;
top: 896px;
left: 236px;
width: 197px;
height: 50px;
color: #ffffff;
letter-spacing: 4px;
background: -webkit-linear-gradient(#eee, #333);
font-family: "consolas", sans-serif;
-webki
<div class="button">
<a href="/project2/contact.html">
<span></span>
<span></span>
<span></span>
<span></span>
contact me
</div>
<div class="secondaryButton">
<a href="https://www.linkedin.com/in/blah-blah/">
<span></span>
<span></span>
<span></span>
<span></span>
linkedIn<ion-icon name="logo-linkedin"></ion-icon>
</div>
your underline is on a link so you have to remove text-decoratuon on a tag. then on a tag :focus change your color. Look at code below if thats help you.
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.title h1 {
font-size: 36px;
font-family: "Lato", sans-serif;
margin-top: 90px;
margin-left: 860px;
margin-right: 10px;
text-align: center;
/* !!!! !!!! Styling the text and giving it gradient *מדרון* !!!! !!!!*/
color: #ffffff;
background: -webkit-linear-gradient(#eee, #333);
-webkit-background-clip:text;
-webkit-text-fill-color: transparent;
text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
/* Make sure text is infront of background images */
display: block;
position: relative;
z-index: 3;
}
#keyframes move-twink-back {
from {
background-position: 0 0;
}
to {
background-position: -10000px 5000px;
}
}
#keyframes move-clouds-back {
from {
background-position: 0 0;
}
to {
background-position: 10000px 0;
}
}
.stars,
.twinkling,
.clouds {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
display: block;
}
.stars {
background: #000 url(stars.png) repeat top center;
z-index: 0;
}
.twinkling {
background: transparent url(twinkling.png) repeat top center;
z-index: 1;
animation: move-twink-back 200s linear infinite;
}
.clouds {
background: transparent url(clouds.png) repeat top center;
z-index: 2;
opacity: 0.4;
animation: move-clouds-back 200s linear infinite;
}
.secondarytitle,
h2 {
font-size: 63px;
font-weight: 500;
letter-spacing: 5px;
cursor: pointer;
font-family: "Lato", sans-serif;
margin-top: 90px;
margin-left: 705px;
margin-right: 10px;
text-align: center;
color: #ffffff;
background: -webkit-linear-gradient(#eee, #333);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
display: block;
position: absolute;
z-index: 3;
}
body {
display: flex;
min-height: 100vh;
}
.secondarytitle,
h2 span {
transition: 0.5s;
}
.secondarytitle,
h2:hover span:nth-child(1) {
margin-right: 28px;
}
.secondarytitle,
h2:hover span:nth-child(2)::after {
margin-right: 10px;
}
.secondarytitle,
h2:hover span:nth-child(2)::after {
content: "";
margin-left: 10px;
}
.secondarytitle,
h2:hover span {
color: #fff;
text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 40px #fff, 0 0 80px #fff,
0 0 120px #fff;
}
table,
tr,
td,
th{
color: #ffffff;
background: -webkit-linear-gradient(#eee, #333);
font-family: "Lato", sans-serif;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
z-index: 2;
position: absolute;
font-size: 24px;
font-weight: 600;
}
.tabledata{
top: 400px;
left: 231px;
width: 1200px;
height: 550px;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
z-index: 2;
}
.button{
font-size: 27px;
font-weight: 800px;
top: 896px;
left: 1233px;
width: 248px;
height: 46px;
color: #ffffff;
letter-spacing: 4px;
background: -webkit-linear-gradient(#eee, #333);
font-family: "consolas", sans-serif;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
z-index: 3;
position: absolute;
transition: 1.7s;
text-decoration: none;
overflow: hidden;
text-transform: uppercase;
display: inline-block;
cursor: pointer;
}
.button a, .secondaryButton a {text-decoration: none; }
a:focus {color: gray;}
.button:hover
{
color: #ffffff;
background: #ffffff;
box-shadow: 0 0 10px #ffffff, 0 0 40px #ffffff, 0 0 80px #ffffff;
transition-delay: 0.05s;
}
.secondaryButton{
font-size: 27px;
font-weight: 800px;
top: 10px;
left: 236px;
width: 197px;
height: 50px;
color: #ffffff;
letter-spacing: 4px;
background: -webkit-linear-gradient(#eee, #333);
font-family: "consolas", sans-serif;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
z-index: 4;
position: absolute;
transition: 1.7s;
text-decoration: none;
overflow: hidden;
display: inline-block;
cursor: pointer;
}
.secondaryButton:hover
{
color: rgb(165, 70, 254);
background: rgb(188, 123, 248);
box-shadow: 0 0 10px rgb(165, 70, 254), 0 0 40px rgb(165, 70, 254), 0 0 80px rgb(165, 70, 254);
transition-delay: 0.05s;
}
<div class="button">
<a href="/project2/contact.html">
<span></span>
<span></span>
<span></span>
<span></span>
contact me</a>
</div>
<div class="secondaryButton">
<a href="https://www.linkedin.com/in/blah-blah/">
<span></span>
<span></span>
<span></span>
<span></span>
linkedIn<ion-social-icon name="logo-linkedin">
</div>
Set the CSS of your tag like this
For example:
<a href='xyx.com' class='style'>
CSS
.style{
text-decoration:none
}
Just add your child selector a to the button classes so your button classes are targeting the anchor element...
.button a{
...
}
.button a:hover
{
...
}
.secondaryButton a{
...
}
A better solution is to remove the div wrappers and move your class into the anchor tag directly and also beef up your anchor CSS selectors with pseudo-classes as shown below so you have more granular control of your links.
.button,
.button:link,
.button:visited,
.button:focus,
.button:active{
...
}
.button:hover
{
...
}
.secondaryButton,
.secondaryButton:link,
.secondaryButton:visited,
.secondaryButton:hover,
.secondaryButton:focus,
.secondaryButton:active{
...
}
<a class="button" href="/project2/contact.html">contact me</a>
<a class="secondaryButton" href="https://www.linkedin.com/in/blah-blah/">linkedIn</a>
'''
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.title h1 {
font-size: 36px;
font-family: "Lato", sans-serif;
margin-top: 90px;
margin-left: 860px;
margin-right: 10px;
text-align: center;
/* !!!! !!!! Styling the text and giving it gradient *מדרון* !!!! !!!!*/
color: #ffffff;
background: -webkit-linear-gradient(#eee, #333);
-webkit-background-clip:text;
-webkit-text-fill-color: transparent;
text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
/* Make sure text is infront of background images */
display: block;
position: relative;
z-index: 3;
}
#keyframes move-twink-back {
from {
background-position: 0 0;
}
to {
background-position: -10000px 5000px;
}
}
#keyframes move-clouds-back {
from {
background-position: 0 0;
}
to {
background-position: 10000px 0;
}
}
.stars,
.twinkling,
.clouds {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
display: block;
}
.stars {
background: #000 url(stars.png) repeat top center;
z-index: 0;
}
.twinkling {
background: transparent url(twinkling.png) repeat top center;
z-index: 1;
animation: move-twink-back 200s linear infinite;
}
.clouds {
background: transparent url(clouds.png) repeat top center;
z-index: 2;
opacity: 0.4;
animation: move-clouds-back 200s linear infinite;
}
.secondarytitle,
h2 {
font-size: 63px;
font-weight: 500;
letter-spacing: 5px;
cursor: pointer;
font-family: "Lato", sans-serif;
margin-top: 90px;
margin-left: 705px;
margin-right: 10px;
text-align: center;
color: #ffffff;
background: -webkit-linear-gradient(#eee, #333);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
display: block;
position: absolute;
z-index: 3;
}
body {
display: flex;
min-height: 100vh;
}
.secondarytitle,
h2 span {
transition: 0.5s;
}
.secondarytitle,
h2:hover span:nth-child(1) {
margin-right: 28px;
}
.secondarytitle,
h2:hover span:nth-child(2)::after {
margin-right: 10px;
}
.secondarytitle,
h2:hover span:nth-child(2)::after {
content: "";
margin-left: 10px;
}
.secondarytitle,
h2:hover span {
color: #fff;
text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 40px #fff, 0 0 80px #fff,
0 0 120px #fff;
}
table,
tr,
td,
th{
color: #ffffff;
background: -webkit-linear-gradient(#eee, #333);
font-family: "Lato", sans-serif;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
z-index: 2;
position: absolute;
font-size: 24px;
font-weight: 600;
}
.tabledata{
top: 400px;
left: 231px;
width: 1200px;
height: 550px;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
z-index: 2;
}
.button{
font-size: 27px;
font-weight: 800px;
top: 896px;
left: 1233px;
width: 248px;
height: 46px;
color: #ffffff;
letter-spacing: 4px;
background: -webkit-linear-gradient(#eee, #333);
font-family: "consolas", sans-serif;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 6px 6px 0px rgba(0, 0, 0, 0.2);
z-index: 3;
position: absolute;
transition: 1.7s;
text-decoration: none;
overflow: hidden;
text-transform: uppercase;
display: inline-block;
cursor: pointer;
}
.button:hover
{
color: #ffffff;
background: #ffffff;
box-shadow: 0 0 10px #ffffff, 0 0 40px #ffffff, 0 0 80px #ffffff;
transition-delay: 0.05s;
}
.button a{
text-decoration : none;`
}
.secondaryButton{
font-size: 27px;
font-weight: 800px;
top: 896px;
left: 236px;
width: 197px;
height: 50px;
color: #ffffff;
letter-spacing: 4px;
background: -webkit-linear-gradient(#eee, #333);
font-family: "consolas", sans-serif;
-webki
/* remove the underline and red color when the button is clicked */
/* .button > a {
text-decoration: none;
}
.button > a:focus{
color: black;
}
.secondaryButton > a{
text-decoration: none;
}
.secondaryButton > a:focus{
color: black;
} */
<div class="button">
<a href="/project2/contact.html">
<span></span>
<span></span>
<span></span>
<span></span>
contact me
</div>
<div class="secondaryButton">
<a href="https://www.linkedin.com/in/blah-blah/">
<span></span>
<span></span>
<span></span>
<span></span>
linkedIn<ion-icon name="logo-linkedin"></ion-icon>
</div>
<!-- I suggest like this to make a button or link, just style it -->
<!-- <div class="button">
Contact me
</div>
<div class="secondaryButton">
LinkedIn
</div> -->
I suggest that if you create a button it's better to use the <button></button> tag, if you want to remove the underline, give the <a> element a style text-decoration:none,and your <a> tag has no closing tag </a>

Adding "check" icon before text on notification

I'm trying to design a notification and I want to add an icon before the text, but I'm not getting it! My code looks like this:
HTML
<html>
<head>
<title></title>
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
<link href="css/style.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="notif-container">teste</div>
</body>
</html>
CSS
body {
background-color: white !important;
}
.template, .notification {
display: none;
}
.notif-container::before{
max-width: 5px;
max-height: 5px;
background-image: url(https://image.flaticon.com/icons/svg/1828/1828743.svg);
background-position: left;
}
.notif-container {
width: 20%;
position: absolute;
right: 15%;
display: flex;
flex-flow: row;
flex-wrap: wrap;
padding: 10px;
background-image: -webkit-linear-gradient(rgb(28, 154, 212), rgb(0, 78, 167));
background-image: -moz-linear-gradient(rgb(28, 154, 212), rgb(0, 78, 167));
background-image: -o-linear-gradient(rgb(28, 154, 212), rgb(0, 78, 167));
background-image: linear-gradient(rgb(28, 154, 212), rgb(0, 78, 167));
background-position: center;
color: #ffffff;
text-shadow: 1px 1px #000;
border-radius: 2px;
margin: 5px;
font: caption;
font-size: 12px;
font-weight: bold;
text-align: center;
}
Somebody knows what I'm doing wrong and how can I do it? I already tried various ways but without success
You need position: relative on the element with the class notif-container.
body {
background-color: white !important;
}
.template, .notification {
display: none;
}
.notif-container::before {
content: '';
width: 16px;/*set the width instead of the max-width*/
height: 16px;/*The same goes here*/
background-image: url(https://image.flaticon.com/icons/svg/1828/1828743.svg);
background-position: center;/*Add this*/
background-size: contain; /*Add this*/
}
.notif-container {
width: 20%;
position: relative;/*change this*/
display: flex;
flex-flow: row;
flex-wrap: wrap;
padding: 10px;
background-image: -webkit-linear-gradient(rgb(28, 154, 212), rgb(0, 78, 167));
background-image: -moz-linear-gradient(rgb(28, 154, 212), rgb(0, 78, 167));
background-image: -o-linear-gradient(rgb(28, 154, 212), rgb(0, 78, 167));
background-image: linear-gradient(rgb(28, 154, 212), rgb(0, 78, 167));
background-position: center;
color: #ffffff;
text-shadow: 1px 1px #000;
border-radius: 2px;
margin: 5px;
font: caption;
font-size: 12px;
font-weight: bold;
text-align: center;
}
<div class="notif-container">teste</div>
Here is a clean version using flex-end on the parent element.
.notif-container{
display: flex;
justify-content: flex-end;
padding: 2rem;
}
.notif-container button {
border: none;
position: relative;/*change this*/
padding: 10px 24px;
color: #ffffff;
background-image: -webkit-linear-gradient(rgb(28, 154, 212), rgb(0, 78, 167));
background-image: -moz-linear-gradient(rgb(28, 154, 212), rgb(0, 78, 167));
background-image: -o-linear-gradient(rgb(28, 154, 212), rgb(0, 78, 167));
background-image: linear-gradient(rgb(28, 154, 212), rgb(0, 78, 167));
background-position: center;
text-shadow: 1px 1px #000;
border-radius: 2px;
margin: 5px;
font: caption;
font-size: 12px;
font-weight: bold;
}
.notif-container button::before {
content: '';
position: absolute;
left: 6px;
width: 16px;/*set the width instead of the max-width*/
height: 16px;/*The same goes here*/
background-image: url(https://image.flaticon.com/icons/svg/1828/1828743.svg);
background-position: center;/*Add this*/
background-size: contain; /*Add this*/
}
<div class="notif-container">
<button>teste</button>
</div>

Placeholder glitches on Chrome and Safari browser showing perfect for mozilla browser

I create login form, have email and password fields both form place changes position in chrome and safari browser
/*LOGIN*/
.login-container{
display: flex;
width: 100%;
min-height: 100vh;
}
.login-form:before{
content: "";
position: absolute;
bottom: 0px;
right: 50px;
height: 800px;
width: 800px;
background: transparent;
border: 1px solid rgba(0, 0, 0, 0.05);
border-radius: 900px;
}
.login-form{
flex-basis: 575px;
flex-grow: 0;
position: relative;
background: linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -moz-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -webkit-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -ms-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -o-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
padding: 75px;
}
.login-form:after{
content: "";
position: absolute;
bottom: 0px;
right: 130px;
height: 600px;
width: 600px;
background: transparent;
border: 1px solid rgba(0, 0, 0, 0.05);
border-radius: 600px;
}
.login-form .band-identity{
height: 85px;
width: 85px;
border-radius: 20px 35px 20px 35px;
background-color: #000;
display: inline-flex;
align-items: center;
justify-content: center;
border: 5px solid #fff;
}
.login-form .brand-heading{
flex-grow: 1;
flex-basis: 0;
}
.login-form h3.page-title{
font-family: poppins-regular;
font-size: 24px;
background-color: #000000;
border-radius: 100px;
padding: 12px 30px 17px 30px;
color: #fff;
display: inline-flex;
margin-right: -150px;
float: right;
letter-spacing: 1px;
}
.login-container h4.page-title{
font-family: poppins-regular;
font-size: 24px;
background-color: #000000;
border-radius: 100px 0px 0px 100px;
padding: 20px 30px 25px 30px;
color: #fff;
display: inline-flex;
position: absolute;
bottom: 100px;
right: 0px;
}
.login-form h1 span{
font-family: poppins-medium;
font-size: 26px;
color: #000;
display: block;
line-height: 40px;
}
.login-form h1{
font-family: poppins-bold;
color: #324ee1;
font-size: 42px;
position: relative;
padding: 35px 0px 60px 0px;
}
.login-form h1:after{
content: "";
bottom: 0px;
right: 27px;
height: 50px;
width: 50px;
border-radius: 50px;
border: 10px solid #ffc000;
position: absolute;
}
.login-banner{
flex-grow: 1;
flex-basis: 0;
}
.login-banner img{
height: 100%;
width: 100%;
object-fit: cover;
}
form.material-form{
position: relative;
z-index: 1;
}
.material-form .form-group{
margin-bottom: 50px;
}
.material-form label{
color: rgba(0,0,0,0.7);
font-size: 18px;
margin-bottom: 5px;
font-family: avenir-roman;
opacity: 0.5;
}
.material-form a.btn-send-message{
white-space: nowrap;
}
.material-form #errorHandling{
display: none;
}
.material-form .form-group i {
position: absolute;
left: 15px;
top: 45px;
color: rgba(0, 0, 0, 0.60);
font-size: 20px;
}
.material-form .form-group p {
font-family: ubuntu-regular;
font-size: 18px;
opacity: 0.6;
}
.material-form input,
.material-form textarea {
margin: 0px 0px 10px 0px;
width: 100%;
display: block;
border: none;
padding: 10px 0 10px 35px;
border-bottom: solid 1px rgba(0, 0, 0, 0.15);
-webkit-transition: all 0.3s cubic-bezier(0.64, 0.09, 0.08, 1);
transition: all 0.3s cubic-bezier(0.64, 0.09, 0.08, 1);
background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,0) calc(100% - 2px), #324ee1 calc(100% - 2px), #324ee1 100%);
background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0) calc(100% - 2px), #324ee1 calc(100% - 2px), #324ee1 100%);
background-position: 0 0;
background-size: 0px 100%;
background-repeat: no-repeat;
color: rgba(0, 0, 0, 0.95);
font-size: 20px;
resize: none;
font-family: poppins-regular;
}
/* .material-form input:focus,
.material-form input:valid,
.material-form textarea:focus,
.material-form textarea:valid { */
.material-form input:focus,
.material-form textarea:focus{
box-shadow: none;
outline: none;
background-size: 100% 100%;
border-bottom: solid 1px #324ee1;
}
.material-form input::-webkit-input-placeholder,
.material-form textarea::-webkit-input-placeholder {
font-family: 'roboto', sans-serif;
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
font-size: 10px;
}
.material-form input:focus::-webkit-input-placeholder,
.material-form input:valid::-webkit-input-placeholder,
.material-form textarea:focus::-webkit-input-placeholder,
.material-form textarea:valid::-webkit-input-placeholder {
color: #000;
font-size: 10px;
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
visibility: visible !important;
}
a.link-forgot-password {
font-family: avenir-roman;
font-size: 19px;
color: rgba(0, 0, 0, 0.55);
margin: 10px 0px;
display: block;
}
a.link-forgot-password:hover {
color: rgba(0, 0, 0, 0.75);
}
.btn-login{
margin-top: 35px;
transition: all 0.3s;
font-size: 20px;
}
.btn-login:hover{
color: #fff;
background-color: #3149c9;
margin-top: 32px;
transition: all 0.3s;
}
.btn-login:hover:after{
bottom: -1px;
opacity: 0.85;
}
.btn-login:hover i{
animation: 1s iconbounce forwards;
transition: 0.5s;
}
<form action="login.php" id="login" name="login" method="post" class="material-form py-sm-0">
<div class="row">
<div class="col-12">
<div class="form-group">
<label for="email">email</label>
<i class="far fa-envelope-open"></i>
<input type="text" id="email" name="email" aria-describedby="errorHandling" placeholder="companysupport#gmail.com" >
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="password">password</label>
<i class="fa fa-key"></i>
<input type="password" id="password" name="password" aria-describedby="errorHandling" placeholder="**********" >
</div>
</div>
<div class="col-12">
Forgot your password?
</div>
<div class="col-12">
<button type="submit" class="btn-style-1 btn-lg btn-login">login <i class="fas fa-arrow-right ml-3"></i></button>
</div>
</div>
</form>
It is showing perfect for mozilla browser
It glitches as below images for chrome and safari browsers as below
Thank You
You should remove the following rules if you don't want to alter its position
.material-form input::-webkit-input-placeholder,
.material-form textarea::-webkit-input-placeholder {
font-family: 'roboto', sans-serif;
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
font-size: 10px;
}
.material-form input:focus::-webkit-input-placeholder,
.material-form input:valid::-webkit-input-placeholder,
.material-form textarea:focus::-webkit-input-placeholder,
.material-form textarea:valid::-webkit-input-placeholder {
color: #000;
font-size: 10px;
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
visibility: visible !important;
}
/*LOGIN*/
.login-container {
display: flex;
width: 100%;
min-height: 100vh;
}
.login-form:before {
content: "";
position: absolute;
bottom: 0px;
right: 50px;
height: 800px;
width: 800px;
background: transparent;
border: 1px solid rgba(0, 0, 0, 0.05);
border-radius: 900px;
}
.login-form {
flex-basis: 575px;
flex-grow: 0;
position: relative;
background: linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -moz-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -webkit-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -ms-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -o-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
padding: 75px;
}
.login-form:after {
content: "";
position: absolute;
bottom: 0px;
right: 130px;
height: 600px;
width: 600px;
background: transparent;
border: 1px solid rgba(0, 0, 0, 0.05);
border-radius: 600px;
}
.login-form .band-identity {
height: 85px;
width: 85px;
border-radius: 20px 35px 20px 35px;
background-color: #000;
display: inline-flex;
align-items: center;
justify-content: center;
border: 5px solid #fff;
}
.login-form .brand-heading {
flex-grow: 1;
flex-basis: 0;
}
.login-form h3.page-title {
font-family: poppins-regular;
font-size: 24px;
background-color: #000000;
border-radius: 100px;
padding: 12px 30px 17px 30px;
color: #fff;
display: inline-flex;
margin-right: -150px;
float: right;
letter-spacing: 1px;
}
.login-container h4.page-title {
font-family: poppins-regular;
font-size: 24px;
background-color: #000000;
border-radius: 100px 0px 0px 100px;
padding: 20px 30px 25px 30px;
color: #fff;
display: inline-flex;
position: absolute;
bottom: 100px;
right: 0px;
}
.login-form h1 span {
font-family: poppins-medium;
font-size: 26px;
color: #000;
display: block;
line-height: 40px;
}
.login-form h1 {
font-family: poppins-bold;
color: #324ee1;
font-size: 42px;
position: relative;
padding: 35px 0px 60px 0px;
}
.login-form h1:after {
content: "";
bottom: 0px;
right: 27px;
height: 50px;
width: 50px;
border-radius: 50px;
border: 10px solid #ffc000;
position: absolute;
}
.login-banner {
flex-grow: 1;
flex-basis: 0;
}
.login-banner img {
height: 100%;
width: 100%;
object-fit: cover;
}
form.material-form {
position: relative;
z-index: 1;
}
.material-form .form-group {
margin-bottom: 50px;
}
.material-form label {
color: rgba(0, 0, 0, 0.7);
font-size: 18px;
margin-bottom: 5px;
font-family: avenir-roman;
opacity: 0.5;
}
.material-form a.btn-send-message {
white-space: nowrap;
}
.material-form #errorHandling {
display: none;
}
.material-form .form-group i {
position: absolute;
left: 15px;
top: 45px;
color: rgba(0, 0, 0, 0.60);
font-size: 20px;
}
.material-form .form-group p {
font-family: ubuntu-regular;
font-size: 18px;
opacity: 0.6;
}
.material-form input,
.material-form textarea {
margin: 0px 0px 10px 0px;
width: 100%;
display: block;
border: none;
padding: 10px 0 10px 35px;
border-bottom: solid 1px rgba(0, 0, 0, 0.15);
-webkit-transition: all 0.3s cubic-bezier(0.64, 0.09, 0.08, 1);
transition: all 0.3s cubic-bezier(0.64, 0.09, 0.08, 1);
background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) calc(100% - 2px), #324ee1 calc(100% - 2px), #324ee1 100%);
background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) calc(100% - 2px), #324ee1 calc(100% - 2px), #324ee1 100%);
background-position: 0 0;
background-size: 0px 100%;
background-repeat: no-repeat;
color: rgba(0, 0, 0, 0.95);
font-size: 20px;
resize: none;
font-family: poppins-regular;
}
/* .material-form input:focus,
.material-form input:valid,
.material-form textarea:focus,
.material-form textarea:valid { */
.material-form input:focus,
.material-form textarea:focus {
box-shadow: none;
outline: none;
background-size: 100% 100%;
border-bottom: solid 1px #324ee1;
}
a.link-forgot-password {
font-family: avenir-roman;
font-size: 19px;
color: rgba(0, 0, 0, 0.55);
margin: 10px 0px;
display: block;
}
a.link-forgot-password:hover {
color: rgba(0, 0, 0, 0.75);
}
.btn-login {
margin-top: 35px;
transition: all 0.3s;
font-size: 20px;
}
.btn-login:hover {
color: #fff;
background-color: #3149c9;
margin-top: 32px;
transition: all 0.3s;
}
.btn-login:hover:after {
bottom: -1px;
opacity: 0.85;
}
.btn-login:hover i {
animation: 1s iconbounce forwards;
transition: 0.5s;
}
<form action="login.php" id="login" name="login" method="post" class="material-form py-sm-0">
<div class="row">
<div class="col-12">
<div class="form-group">
<label for="email">email</label>
<i class="far fa-envelope-open"></i>
<input type="text" id="email" name="email" aria-describedby="errorHandling" placeholder="companysupport#gmail.com">
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="password">password</label>
<i class="fa fa-key"></i>
<input type="password" id="password" name="password" aria-describedby="errorHandling" placeholder="**********">
</div>
</div>
<div class="col-12">
Forgot your password?
</div>
<div class="col-12">
<button type="submit" class="btn-style-1 btn-lg btn-login">login <i class="fas fa-arrow-right ml-3"></i></button>
</div>
</div>
</form>
You should use the following code to support all browsers:
Example:
.input-email::-webkit-input-placeholder {
font-style: italic;
font-size: 12px;
font-weight: 600;
color: #9b9b9b;
}
/* WebKit, Blink, Edge */
.input-email:-moz-placeholder {
font-style: italic;
font-size: 12px;
font-weight: 600;
color: #9b9b9b;
}
/* Mozilla Firefox 4 to 18 */
.input-email::-moz-placeholder {
font-style: italic;
font-size: 12px;
font-weight: 600;
color: #9b9b9b;
}
/* Mozilla Firefox 19+ */
.input-email:-ms-input-placeholder {
font-style: italic;
font-size: 12px;
font-weight: 600;
color: #9b9b9b;
}
/* Internet Explorer 10-11 */
.input-email::-ms-input-placeholder {
font-style: italic;
font-size: 12px;
font-weight: 600;
color: #9b9b9b;
}
Remove this code
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
from
.material-form input:focus::-webkit-input-placeholder,
.material-form input:valid::-webkit-input-placeholder,
.material-form textarea:focus::-webkit-input-placeholder,
.material-form textarea:valid::-webkit-input-placeholder {
color: #000;
font-size: 10px;
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
visibility: visible !important;
}
/*LOGIN*/
.login-container{
display: flex;
width: 100%;
min-height: 100vh;
}
.login-form:before{
content: "";
position: absolute;
bottom: 0px;
right: 50px;
height: 800px;
width: 800px;
background: transparent;
border: 1px solid rgba(0, 0, 0, 0.05);
border-radius: 900px;
}
.login-form{
flex-basis: 575px;
flex-grow: 0;
position: relative;
background: linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -moz-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -webkit-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -ms-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
background: -o-linear-gradient(to top left, rgba(50, 78, 225, 0.20) 0%, rgba(255, 255, 255, 0.0) 100%);
padding: 75px;
}
.login-form:after{
content: "";
position: absolute;
bottom: 0px;
right: 130px;
height: 600px;
width: 600px;
background: transparent;
border: 1px solid rgba(0, 0, 0, 0.05);
border-radius: 600px;
}
.login-form .band-identity{
height: 85px;
width: 85px;
border-radius: 20px 35px 20px 35px;
background-color: #000;
display: inline-flex;
align-items: center;
justify-content: center;
border: 5px solid #fff;
}
.login-form .brand-heading{
flex-grow: 1;
flex-basis: 0;
}
.login-form h3.page-title{
font-family: poppins-regular;
font-size: 24px;
background-color: #000000;
border-radius: 100px;
padding: 12px 30px 17px 30px;
color: #fff;
display: inline-flex;
margin-right: -150px;
float: right;
letter-spacing: 1px;
}
.login-container h4.page-title{
font-family: poppins-regular;
font-size: 24px;
background-color: #000000;
border-radius: 100px 0px 0px 100px;
padding: 20px 30px 25px 30px;
color: #fff;
display: inline-flex;
position: absolute;
bottom: 100px;
right: 0px;
}
.login-form h1 span{
font-family: poppins-medium;
font-size: 26px;
color: #000;
display: block;
line-height: 40px;
}
.login-form h1{
font-family: poppins-bold;
color: #324ee1;
font-size: 42px;
position: relative;
padding: 35px 0px 60px 0px;
}
.login-form h1:after{
content: "";
bottom: 0px;
right: 27px;
height: 50px;
width: 50px;
border-radius: 50px;
border: 10px solid #ffc000;
position: absolute;
}
.login-banner{
flex-grow: 1;
flex-basis: 0;
}
.login-banner img{
height: 100%;
width: 100%;
object-fit: cover;
}
form.material-form{
position: relative;
z-index: 1;
}
.material-form .form-group{
margin-bottom: 50px;
}
.material-form label{
color: rgba(0,0,0,0.7);
font-size: 18px;
margin-bottom: 5px;
font-family: avenir-roman;
opacity: 0.5;
}
.material-form a.btn-send-message{
white-space: nowrap;
}
.material-form #errorHandling{
display: none;
}
.material-form .form-group i {
position: absolute;
left: 15px;
top: 45px;
color: rgba(0, 0, 0, 0.60);
font-size: 20px;
}
.material-form .form-group p {
font-family: ubuntu-regular;
font-size: 18px;
opacity: 0.6;
}
.material-form input,
.material-form textarea {
margin: 0px 0px 10px 0px;
width: 100%;
display: block;
border: none;
padding: 10px 0 10px 35px;
border-bottom: solid 1px rgba(0, 0, 0, 0.15);
-webkit-transition: all 0.3s cubic-bezier(0.64, 0.09, 0.08, 1);
transition: all 0.3s cubic-bezier(0.64, 0.09, 0.08, 1);
background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,0) calc(100% - 2px), #324ee1 calc(100% - 2px), #324ee1 100%);
background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0) calc(100% - 2px), #324ee1 calc(100% - 2px), #324ee1 100%);
background-position: 0 0;
background-size: 0px 100%;
background-repeat: no-repeat;
color: rgba(0, 0, 0, 0.95);
font-size: 20px;
resize: none;
font-family: poppins-regular;
}
/* .material-form input:focus,
.material-form input:valid,
.material-form textarea:focus,
.material-form textarea:valid { */
.material-form input:focus,
.material-form textarea:focus{
box-shadow: none;
outline: none;
background-size: 100% 100%;
border-bottom: solid 1px #324ee1;
}
.material-form input::-webkit-input-placeholder,
.material-form textarea::-webkit-input-placeholder {
font-family: 'roboto', sans-serif;
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
font-size: 10px;
}
.material-form input:focus::-webkit-input-placeholder,
.material-form input:valid::-webkit-input-placeholder,
.material-form textarea:focus::-webkit-input-placeholder,
.material-form textarea:valid::-webkit-input-placeholder {
color: #000;
font-size: 10px;
visibility: visible !important;
}
a.link-forgot-password {
font-family: avenir-roman;
font-size: 19px;
color: rgba(0, 0, 0, 0.55);
margin: 10px 0px;
display: block;
}
a.link-forgot-password:hover {
color: rgba(0, 0, 0, 0.75);
}
.btn-login{
margin-top: 35px;
transition: all 0.3s;
font-size: 20px;
}
.btn-login:hover{
color: #fff;
background-color: #3149c9;
margin-top: 32px;
transition: all 0.3s;
}
.btn-login:hover:after{
bottom: -1px;
opacity: 0.85;
}
.btn-login:hover i{
animation: 1s iconbounce forwards;
transition: 0.5s;
}
<form action="login.php" id="login" name="login" method="post" class="material-form py-sm-0">
<div class="row">
<div class="col-12">
<div class="form-group">
<label for="email">email</label>
<i class="far fa-envelope-open"></i>
<input type="text" id="email" name="email" aria-describedby="errorHandling" placeholder="companysupport#gmail.com" >
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="password">password</label>
<i class="fa fa-key"></i>
<input type="password" id="password" name="password" aria-describedby="errorHandling" placeholder="**********" >
</div>
</div>
<div class="col-12">
Forgot your password?
</div>
<div class="col-12">
<button type="submit" class="btn-style-1 btn-lg btn-login">login <i class="fas fa-arrow-right ml-3"></i></button>
</div>
</div>
</form>

Why doesn't my flexbox hover effects work as expected in IE 11?

I have instituted a flex-grid in my code, however its not functioning as expected in ie11 (i unfortunately need to have it work there too)—Chrome and Firefox both work fine. What seems to happen is when I load in IE11—the flex boxes only load 1 per line and are no longer hovering appropriately.
I am honestly at a loss here... anything I change breaks Chrome and Firefox.
.flex_row {
display: flex;
flex-flow: row wrap;
justify-content: space-around;
}
.flex_col{
flex: 1;
margin: 10px;
}
.circle_shape {
position: relative;
display: flex;
padding: 50% 0;
border-radius: 50%;
overflow: hidden;
border: 1px solid gray;
font-size: 16px;
font-family: 'Source Sans Pro', sans-serif;
justify-content: center;
align-items: center;
background: radial-gradient(circle at 50% 120%, #81e8f6, #76deef 10%, #055194 80%, #062745 100%);
}
.circle_shape:before {
content: "";
position: absolute;
top: 1%;
left: 5%;
width: 90%;
height: 90%;
border-radius: 50%;
background: radial-gradient(circle at 50% 0px, #ffffff, rgba(255, 255, 255, 0) 58%);
filter: blur(5px);
z-index: 2;
}
.circle_shape:hover{
box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 1px 2px rgba(0,0,0,0.1);
}
.circle_shape img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.circle_shape i{
position: absolute;
text-align: center;
font-size: 4vw;
text-shadow:
0 0 1px #fff,
0 1px 2px rgba(0,0,0,0.3);
}
.circle_shape h2 {
position: absolute;
bottom: 10%;
font-size: 1vw;
font-weight: 800;
text-align: center;
}
.circle_text{
position: absolute;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0,51,102, 0.9);
border-radius: 50%;
width: 100%;
height: 100%;
overflow: hidden;
opacity: 0;
transition: all 0.4s ease-in-out;
transform: scale(0);
}
.circle_text p {
color: #fff;
padding: 4px;
text-align: center;
font-size: calc(7px + .5vw);
text-shadow:
0 0 1px #fff,
0 1px 2px rgba(0,0,0,0.3);
}
.circle_shape:hover .circle_text{
transform: scale(1);
opacity: 1;
}
<div class="flex_row">
<a class="flex_col" href="http://www.cnn.com">
<div class="circle_shape">
<i class="fas fa-sitemap"></i>
<div class="circle_text">
<p>Load me some CNN!</p>
</div>
</div>
<div>
<h2>Beep!</h2>
</div>
</a>
<a class="flex_col" href="http://www.cnn.com">
<div class="circle_shape">
<i class="fas fa-sitemap"></i>
<div class="circle_text">
<p>Load me some ABC!</p>
</div>
</div>
<div>
<h2>BIP!</h2>
</div>
</a>
<a class="flex_col" href="http://www.cnn.com">
<div class="circle_shape">
<i class="fas fa-sitemap"></i>
<div class="circle_text">
<p>Load me some BBC!</p>
</div>
</div>
<div>
<h2>BOOP!</h2>
</div>
</a>
</div>
JSFiddle link
IE 11 partially support flex box. Partial support due to large amount of bugs.
Visit the link for more information.
I try to test with the code in IE 11 and try to modify it for testing purpose. I tried many variations in the code but nothing worked so far.
As a work around, I suggest you to refer example below which is working properly in IE and other browsers.
.ch-item {
width: 100%;
height: 100%;
border-radius: 50%;
position: relative;
cursor: default;
box-shadow: inset 0 0 0 0 rgba(200, 95, 66, 0.4), inset 0 0 0 16px rgba(255, 255, 255, 0.6), 0 1px 2px rgba(0, 0, 0, 0.1);
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
z-index: 2;
}
.ch-info {
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
opacity: 0;
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
-webkit-transform: scale(0);
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
-webkit-backface-visibility: hidden;
}
li {
position: relative;
overflow: hidden;
border-radius: 100%;
}
li img {
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
.ch-info h3 {
color: #fff;
text-transform: uppercase;
position: relative;
letter-spacing: 2px;
font-size: 22px;
margin: 0 30px;
padding: 65px 0 0 0;
height: 110px;
font-family: 'Open Sans', Arial, sans-serif;
text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.3);
}
.ch-info p {
color: #fff;
padding: 10px 5px;
font-style: italic;
margin: 0 30px;
font-size: 12px;
border-top: 1px solid rgba(255, 255, 255, 0.5);
}
.ch-info p a {
display: block;
color: #fff;
color: rgba(255, 255, 255, 0.7);
font-style: normal;
font-weight: 700;
text-transform: uppercase;
font-size: 9px;
letter-spacing: 1px;
padding-top: 4px;
font-family: 'Open Sans', Arial, sans-serif;
}
.ch-info p a:hover {
color: #fff222;
color: rgba(255, 242, 34, 0.8);
}
.ch-item:hover {
box-shadow: inset 0 0 0 110px rgba(200, 95, 66, 0.4), inset 0 0 0 16px rgba(255, 255, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.1);
}
.ch-item:hover .ch-info {
opacity: 1;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
#import url('normalize.css');
/* General Demo Style */
body{
font-family: Cambria, Georgia, serif;
background: #f9f9f9 url(../images/bg.jpg);
font-weight: 300;
font-size: 15px;
color: #333;
-webkit-font-smoothing: antialiased;
overflow-y: scroll;
overflow-x: hidden;
}
a{
color: #555;
text-decoration: none;
}
.container{
width: 100%;
position: relative;
}
.clr{
clear: both;
padding: 0;
height: 0;
margin: 0;
}
.main{
width: 90%;
margin: 0 auto;
position: relative;
}
.container > header{
margin: 10px;
padding: 20px 10px 10px 10px;
position: relative;
display: block;
text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
text-align: center;
}
.container > header h1{
font-size: 32px;
line-height: 32px;
margin: 0;
position: relative;
font-weight: 300;
color: #777;
text-shadow: 1px 1px 1px rgba(255,255,255,0.7);
}
.container > header h2{
font-size: 14px;
font-weight: 300;
font-style: italic;
margin: 0;
padding: 15px 0 5px 0;
color: #888;
text-shadow: 1px 1px 1px rgba(255,255,255,0.9);
}
/* Header Style */
.codrops-top{
line-height: 24px;
font-size: 11px;
background: #fff;
background: rgba(255, 255, 255, 0.6);
text-transform: uppercase;
z-index: 9999;
position: relative;
box-shadow: 1px 0px 2px rgba(0,0,0,0.1);
}
.codrops-top a{
padding: 0px 10px;
letter-spacing: 1px;
color: #333;
display: inline-block;
}
.codrops-top a:hover{
background: rgba(255,255,255,0.3);
}
.codrops-top span.right{
float: right;
}
.codrops-top span.right a{
float: left;
display: block;
}
/* Demo Buttons Style */
.codrops-demos{
text-align:center;
display: block;
line-height: 30px;
padding: 5px 0px;
}
.codrops-demos a{
display: inline-block;
font-style: italic;
margin: 0px 4px;
padding: 0px 6px;
color: #aaa;
line-height: 20px;
font-size: 13px;
text-shadow: 1px 1px 1px #fff;
border: 1px solid #fff;
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* IE10+ */
background: linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
.codrops-demos a:hover{
color: #333;
background: #fff;
}
.codrops-demos a:active{
background: #fff;
}
.codrops-demos a.current-demo,
.codrops-demos a.current-demo:hover{
background: #f0f0f0;
border-color: #d9d9d9;
color: #aaa;
box-shadow: 0 1px 1px rgba(255,255,255,0.7);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f6f6f6', endColorstr='#f6f6f6',GradientType=0 ); /* IE6-9 */
}
.support-note span{
color: #ac375d;
font-size: 16px;
display: none;
font-weight: bold;
text-align: center;
padding: 5px 0;
}
.no-cssanimations .support-note span.no-cssanimations,
.no-csstransforms .support-note span.no-csstransforms,
.no-csstransforms3d .support-note span.no-csstransforms3d,
.no-csstransitions .support-note span.no-csstransitions{
display: block;
}
.ch-grid {
margin: 20px 0 0 0;
padding: 0;
list-style: none;
display: block;
text-align: center;
width: 100%;
}
.ch-grid:after,
.ch-item:before {
content: '';
display: table;
}
.ch-grid:after {
clear: both;
}
.ch-grid li {
width: 220px;
height: 220px;
display: inline-block;
margin: 20px;
}
<section class="main">
<ul class="ch-grid">
<li>
<img src="http://tympanus.net/Tutorials/CircleHoverEffects/images/5.jpg" alt="Vision">
<div class="ch-item">
<div class="ch-info">
<h3>Brainiac</h3>
<p>by Daniel Nyari View on Dribbble</p>
</div>
</div>
</li>
</ul>
</section>
Output in IE:
References:
(1) JSFiddle link
(2) Circle Hover Effects with CSS Transitions
Further, you can try to modify the code example as per your requirement.
I just wanted to follow up on this. Rather than rewrite my code -- I decided to hack around it to define a solution.
First step was to identify this is IE 10+ code in my CSS -- i did that through:
#media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
/* IE10+ CSS styles go here */
}
I then redefined my flex_container and flex_item as block (using column code as follows) inside the #media query
[class*="flex_item"] {
float: left;
padding: 15px;
}
.flex_container{
display: block;
overflow: hidden;
box-sizing: border-box;
justify-content: center;
align-items: center;
text-align: center;
flex-direction: none;
font-size: 16px;
}
.flex_item {width: 8.33%;box-sizing: border-box;}
I then went through my code and changed any reference to flex to block within that code. Its a lot of duplication but it essentially got me back to #deepak-MSFTs response.
This effectively resolves my issue.

Why are my buttons moving down on the page?

I am trying to make a navigation bar on my website. I have tried changing the display type of the element holding the buttons, but nothing happens. The main thing I am doing is centering those buttons in the middle of the navbar. What should I do to make it look more natural? Thanks in advance.
Apparently I have to have more sentences too so this is a sentence. This is another sentence. This is another one.
/* import fonts */
#import url('https://fonts.googleapis.com/css?family=Open+Sans|Roboto:300');
html, body {
margin: 0;
background-color: rgb(236, 240, 241);
}
button:focus {
outline:0;
}
.mainBlock {
background-color: rgb(29,49,49);
}
.mainBlock h1 {
text-align: center;
font-family: 'Open Sans', sans-serif;
font-size: 48pt;
padding-top: 20px;
margin-bottom: 0;
padding-bottom: 0;
color: rgb(236, 240, 241);
margin-top: 0;
}
.mainBlock h3 {
text-align: center;
font-family: 'Roboto', sans-serif;
font-size: 18pt;
color: rgb(236, 240, 241);
margin-bottom: 50px;
}
/* big button styles */
.mainButtons {
text-align: center;
}
.mainButtons input[type=submit] {
font-family: 'Open Sans', sans-serif;
font-size: 15pt;
text-align: center;
border: none;
width: 200px;
height: 40px;
margin: 10px;
border-radius: 3px;
color: rgba(255, 255, 255, 1);
position: static;
cursor: pointer;
transition: all 0.1s ease-out;
}
#browse {
background-color: rgb(41, 128, 185);
box-shadow: 0 10px 0 0 rgb(53, 93, 158);
}
#browse:hover {
box-shadow: 0 7px 0 0 rgb(53, 93, 158);
}
#create {
background-color: rgb(231, 76, 60);
box-shadow: 0 10px 0 0 rgb(192, 57, 43);
margin-bottom: 42px;
}
#create:hover {
box-shadow: 0 7px 0 0 rgb(192, 57, 43);
}
button:focus, input[type="submit"]:focus {
outline:0;
}
#navlistcontainer {
float: right;
padding-right: 10px;
}
#nav {
background-color: rgb(26, 188, 156);
font-family: 'Open Sans', sans-serif;
padding-top: 20px;
padding-bottom: 20px;
}
#homelink {
text-decoration: none;
color: white;
background-color: rgb(22, 160, 133);
margin-left: 10px;
padding: 10px;
}
#login {
margin-left: 10px;
}
.navbaritem {
border-radius: 100px;
border: none;
height: 40px;
width: 100px;
box-shadow: 0 3px 7px 3px rgba(0, 0, 0, 0.2);
cursor: pointer;
color: white;
background-color: rgb(52, 73, 94);
transition: all 0.1s ease-out;
}
.navbaritem:hover {
box-shadow: 0 5px 10px 4px rgba(0, 0, 0, 0.2);
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Debater</title>
<link href="css/styles.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" type="image/x-icon" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<!-- Include NavBar -->
<link href="components/navbar.css" rel="stylesheet" type="text/css" />
<link type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<nav id="nav">
<i class="fa fa-home fa-lg" aria-hidden="true"></i> Home
<div id="navlistcontainer">
<button class="navbaritem" id="signup">SIGNUP</button>
<button class="navbaritem" id="login">LOGIN</button>
</div>
</nav>
<!-- Big Main Page Block -->
<div class="mainBlock">
<h1>Welcome to site</h1>
<h3>siteinfo<br>
moreinfo</h3>
<div class="buttonsWrapper">
<form class="mainButtons">
<input type="submit" value="Basdasds" id="browse">
<input type="submit" value="Cs" id="create" formaction="debate.php">
</form> <!-- Ends the buttons form -->
</div> <!-- Ends buttons wrapper -->
</div>
</body>
</html>
I think part of the problem you're having is that your nav doesn't contain the height of its children because the buttons to the right are floated. In order to solve that problem, you can clearfix it.
With the nav clearfixed, the 20px top and bottom padding will actually sit evenly around the buttons. Then you can fix the misalignment of the home link on the left by changing it to display: inline-block.
/* import fonts */
#import url('https://fonts.googleapis.com/css?family=Open+Sans|Roboto:300');
html,
body {
margin: 0;
background-color: rgb(236, 240, 241);
}
.clearfix::after { /* THIS IS NEW */
content: '';
display: table;
clear: both;
}
button:focus {
outline: 0;
}
.mainBlock {
background-color: rgb(29, 49, 49);
}
.mainBlock h1 {
text-align: center;
font-family: 'Open Sans', sans-serif;
font-size: 48pt;
padding-top: 20px;
margin-bottom: 0;
padding-bottom: 0;
color: rgb(236, 240, 241);
margin-top: 0;
}
.mainBlock h3 {
text-align: center;
font-family: 'Roboto', sans-serif;
font-size: 18pt;
color: rgb(236, 240, 241);
margin-bottom: 50px;
}
/* big button styles */
.mainButtons {
text-align: center;
}
.mainButtons input[type=submit] {
font-family: 'Open Sans', sans-serif;
font-size: 15pt;
text-align: center;
border: none;
width: 200px;
height: 40px;
margin: 10px;
border-radius: 3px;
color: rgba(255, 255, 255, 1);
position: static;
cursor: pointer;
transition: all 0.1s ease-out;
}
#browse {
background-color: rgb(41, 128, 185);
box-shadow: 0 10px 0 0 rgb(53, 93, 158);
}
#browse:hover {
box-shadow: 0 7px 0 0 rgb(53, 93, 158);
}
#create {
background-color: rgb(231, 76, 60);
box-shadow: 0 10px 0 0 rgb(192, 57, 43);
margin-bottom: 42px;
}
#create:hover {
box-shadow: 0 7px 0 0 rgb(192, 57, 43);
}
button:focus,
input[type="submit"]:focus {
outline: 0;
}
#navlistcontainer {
float: right;
padding-right: 10px;
}
#nav {
background-color: rgb(26, 188, 156);
font-family: 'Open Sans', sans-serif;
padding-top: 20px;
padding-bottom: 20px;
}
#homelink {
text-decoration: none;
color: white;
background-color: rgb(22, 160, 133);
margin-left: 10px;
padding: 10px;
display: inline-block; /* THIS IS NEW */
}
#login {
margin-left: 10px;
}
.navbaritem {
border-radius: 100px;
border: none;
height: 40px;
width: 100px;
box-shadow: 0 3px 7px 3px rgba(0, 0, 0, 0.2);
cursor: pointer;
color: white;
background-color: rgb(52, 73, 94);
transition: all 0.1s ease-out;
}
.navbaritem:hover {
box-shadow: 0 5px 10px 4px rgba(0, 0, 0, 0.2);
}
<link type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<nav id="nav" class="clearfix"> <!-- CLEARFIX CLASS ADDED TO #NAV -->
<i class="fa fa-home fa-lg" aria-hidden="true"></i> Home
<div id="navlistcontainer">
<button class="navbaritem" id="signup">SIGNUP</button>
<button class="navbaritem" id="login">LOGIN</button>
</div>
</nav>
<!-- Big Main Page Block -->
<div class="mainBlock">
<h1>Welcome to site</h1>
<h3>siteinfo<br> moreinfo
</h3>
<div class="buttonsWrapper">
<form class="mainButtons">
<input type="submit" value="Basdasds" id="browse">
<input type="submit" value="Cs" id="create" formaction="debate.php">
</form>
<!-- Ends the buttons form -->
</div>
<!-- Ends buttons wrapper -->
</div>
Another option is that you can use a flex display. That'll make sure your nav always contains its children, but it's a different way of doing things. With a flex display, floats don't do anything, so you have to find a different way to align your stuff to the right and left edges of the page. justify-content: space-between will do you nicely there.
/* import fonts */
#import url('https://fonts.googleapis.com/css?family=Open+Sans|Roboto:300');
html,
body {
margin: 0;
background-color: rgb(236, 240, 241);
}
button:focus {
outline: 0;
}
.mainBlock {
background-color: rgb(29, 49, 49);
}
.mainBlock h1 {
text-align: center;
font-family: 'Open Sans', sans-serif;
font-size: 48pt;
padding-top: 20px;
margin-bottom: 0;
padding-bottom: 0;
color: rgb(236, 240, 241);
margin-top: 0;
}
.mainBlock h3 {
text-align: center;
font-family: 'Roboto', sans-serif;
font-size: 18pt;
color: rgb(236, 240, 241);
margin-bottom: 50px;
}
/* big button styles */
.mainButtons {
text-align: center;
}
.mainButtons input[type=submit] {
font-family: 'Open Sans', sans-serif;
font-size: 15pt;
text-align: center;
border: none;
width: 200px;
height: 40px;
margin: 10px;
border-radius: 3px;
color: rgba(255, 255, 255, 1);
position: static;
cursor: pointer;
transition: all 0.1s ease-out;
}
#browse {
background-color: rgb(41, 128, 185);
box-shadow: 0 10px 0 0 rgb(53, 93, 158);
}
#browse:hover {
box-shadow: 0 7px 0 0 rgb(53, 93, 158);
}
#create {
background-color: rgb(231, 76, 60);
box-shadow: 0 10px 0 0 rgb(192, 57, 43);
margin-bottom: 42px;
}
#create:hover {
box-shadow: 0 7px 0 0 rgb(192, 57, 43);
}
button:focus,
input[type="submit"]:focus {
outline: 0;
}
#navlistcontainer {
/*float: right;*/ /* WE DON'T NEED THIS ANY MORE */
padding-right: 10px;
}
#nav {
background-color: rgb(26, 188, 156);
font-family: 'Open Sans', sans-serif;
padding-top: 20px;
padding-bottom: 20px;
display: flex; /* NEW */
justify-content: space-between; /* NEW */
}
#homelink {
text-decoration: none;
color: white;
background-color: rgb(22, 160, 133);
margin-left: 10px;
padding: 10px;
}
#login {
margin-left: 10px;
}
.navbaritem {
border-radius: 100px;
border: none;
height: 40px;
width: 100px;
box-shadow: 0 3px 7px 3px rgba(0, 0, 0, 0.2);
cursor: pointer;
color: white;
background-color: rgb(52, 73, 94);
transition: all 0.1s ease-out;
}
.navbaritem:hover {
box-shadow: 0 5px 10px 4px rgba(0, 0, 0, 0.2);
}
<link type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<nav id="nav" class="clearfix">
<i class="fa fa-home fa-lg" aria-hidden="true"></i> Home
<div id="navlistcontainer">
<button class="navbaritem" id="signup">SIGNUP</button>
<button class="navbaritem" id="login">LOGIN</button>
</div>
</nav>
<!-- Big Main Page Block -->
<div class="mainBlock">
<h1>Welcome to site</h1>
<h3>siteinfo<br> moreinfo
</h3>
<div class="buttonsWrapper">
<form class="mainButtons">
<input type="submit" value="Basdasds" id="browse">
<input type="submit" value="Cs" id="create" formaction="debate.php">
</form>
<!-- Ends the buttons form -->
</div>
<!-- Ends buttons wrapper -->
</div>
If you go the flex route, you could also kill the top and bottom padding on the nav and simply specify a height for it. Then, using the flex property align-items: center, your buttons will automatically vertically center themselves in the navbar.
/* import fonts */
#import url('https://fonts.googleapis.com/css?family=Open+Sans|Roboto:300');
html,
body {
margin: 0;
background-color: rgb(236, 240, 241);
}
button:focus {
outline: 0;
}
.mainBlock {
background-color: rgb(29, 49, 49);
}
.mainBlock h1 {
text-align: center;
font-family: 'Open Sans', sans-serif;
font-size: 48pt;
padding-top: 20px;
margin-bottom: 0;
padding-bottom: 0;
color: rgb(236, 240, 241);
margin-top: 0;
}
.mainBlock h3 {
text-align: center;
font-family: 'Roboto', sans-serif;
font-size: 18pt;
color: rgb(236, 240, 241);
margin-bottom: 50px;
}
/* big button styles */
.mainButtons {
text-align: center;
}
.mainButtons input[type=submit] {
font-family: 'Open Sans', sans-serif;
font-size: 15pt;
text-align: center;
border: none;
width: 200px;
height: 40px;
margin: 10px;
border-radius: 3px;
color: rgba(255, 255, 255, 1);
position: static;
cursor: pointer;
transition: all 0.1s ease-out;
}
#browse {
background-color: rgb(41, 128, 185);
box-shadow: 0 10px 0 0 rgb(53, 93, 158);
}
#browse:hover {
box-shadow: 0 7px 0 0 rgb(53, 93, 158);
}
#create {
background-color: rgb(231, 76, 60);
box-shadow: 0 10px 0 0 rgb(192, 57, 43);
margin-bottom: 42px;
}
#create:hover {
box-shadow: 0 7px 0 0 rgb(192, 57, 43);
}
button:focus,
input[type="submit"]:focus {
outline: 0;
}
#navlistcontainer {
/*float: right;*/ /* WE DON'T NEED THIS ANY MORE */
padding-right: 10px;
}
#nav {
background-color: rgb(26, 188, 156);
font-family: 'Open Sans', sans-serif;
/*padding-top: 20px;*/ /* WE DON'T NEED THIS ANY MORE */
/*padding-bottom: 20px;*/ /* WE DON'T NEED THIS ANY MORE */
height: 80px; /* NEW */
display: flex; /* NEW */
justify-content: space-between; /* NEW */
align-items: center; /* NEW*/
}
#homelink {
text-decoration: none;
color: white;
background-color: rgb(22, 160, 133);
margin-left: 10px;
padding: 10px;
}
#login {
margin-left: 10px;
}
.navbaritem {
border-radius: 100px;
border: none;
height: 40px;
width: 100px;
box-shadow: 0 3px 7px 3px rgba(0, 0, 0, 0.2);
cursor: pointer;
color: white;
background-color: rgb(52, 73, 94);
transition: all 0.1s ease-out;
}
.navbaritem:hover {
box-shadow: 0 5px 10px 4px rgba(0, 0, 0, 0.2);
}
<link type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<nav id="nav" class="clearfix">
<i class="fa fa-home fa-lg" aria-hidden="true"></i> Home
<div id="navlistcontainer">
<button class="navbaritem" id="signup">SIGNUP</button>
<button class="navbaritem" id="login">LOGIN</button>
</div>
</nav>
<!-- Big Main Page Block -->
<div class="mainBlock">
<h1>Welcome to site</h1>
<h3>siteinfo<br> moreinfo
</h3>
<div class="buttonsWrapper">
<form class="mainButtons">
<input type="submit" value="Basdasds" id="browse">
<input type="submit" value="Cs" id="create" formaction="debate.php">
</form>
<!-- Ends the buttons form -->
</div>
<!-- Ends buttons wrapper -->
</div>
Removing the padding: 25px on #nav and replacing it with line-height: 50px will hopefully fix your issue. It looks like you thought that the buttons would be aligned by their text and not the button itself. The padding was pushing both buttons down 25px, not just their text.