bootstrap and ms edge bug? - html

I have create website (bootstrap). On chrome/firefox etc is working but on edge I have problem. look at this page at bottom part, there are 4 buttons. When they hovered they move and don't get back to normal position.
I searching online but can't find anything about this error. Or it's my wrong code? What do you think?
Code below
#bottom_fourth_row {
display: table;
margin-top: 15px;
}
#bottom_fourth_row [class*="col-"] {
float: none;
display: table-cell;
vertical-align: top;
position: relative;
padding-bottom: 45px;
/*display: table-cell;
vertical-align: top;
position: relative;
padding-bottom: 45px;*/
}
#bottom_fourth_row>.col-sm-3>img {}
#bottom_fourth_row>.col-sm-3>h3 {
font-family: avenir_light;
height: 50px;
text-align: left;
color: #027a9e;
padding: 0;
font-size: 22px;
font-weight: bold;
}
#bottom_fourth_row>.col-sm-3>h4 {
font-family: avenir_light;
text-align: left;
padding: 0;
color: #7d7d7d;
font-size: 18px;
line-height: 1.3em;
}
#bottom_fourth_row [class*="col-"] button {
position: absolute;
bottom: 0;
right: 20px;
margin-left: auto;
margin-right: auto;
width: 90px;
height: 40px;
background-color: #2aa3c3;
font-family: basic;
font-size: 20px;
color: #ffffff;
}
#bottom_fourth_row [class*="col-"] button>a,
#bottom_fourth_row [class*="col-"] button>a:focus,
#bottom_fourth_row [class*="col-"] button>a:hover,
#bottom_fourth_row [class*="col-"] button>a:visited {
color: #ffffff;
}
<div class="row" id="bottom_fourth_row">
<div class="col-xs-12 col-sm-3"> <img src="http://placehold.it/350x150">
<h3>text</h3>
<h4>text</h4>
<form>
<div class="form-inline">
<input type="text" name="email" id="email" placeholder="Email" />
<input type="hidden" name="list" value="wgPkaIHO7pFCp9G65wvXXw" />
<button type="submit" name="submit" id="submit" class="btn">submit</button>
</div>
</form>
</div>
<div class="col-xs-12 col-sm-3"> <img src="http://placehold.it/350x150">
<h3>text</h3>
<h4>text</h4>
<button class="btn">more</button>
</div>
<div class="col-xs-12 col-sm-3"> <img src="http://placehold.it/350x150">
<h3>text</h3>
<h4>text</h4>
<button class="btn">more</button>
</div>
<div class="col-xs-12 col-sm-3"> <img src="http://placehold.it/350x150">
<h3>text</h3>
<h4>text</h4>
<button class="btn">more</button>
</div>
</div>

So I found reason why Edge play with me.
In #bottom_fourth_row [class*="col-"]
I remove:
float: none;
display: table-cell;
and add:
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
this help with this problem.
It's interesting that this was only with Edge.

Related

How to align a form in the center of the page?

With the following code, it shows me that the form is centered on its right side which isn't what I'm going for. I struggle to align the form in the center of the page from the center of the form. I added the HTML and CSS so you can see what it looks like. I hope someone can help resolve this problem :')
.contacter {
width: 90%;
margin: 5%;
text-align: center;
padding-top: 0px;
}
.contacter h1 {
font-size: 36px;
font-weight: 700;
text-align: center;
color: rgb(255, 255, 255);
}
/*formulaire -------------------------------------------------------------------------*/
.formulaire {
text-align: center;
margin: 5%;
padding-top: 0;
width: 90%;
}
.row {
text-align: center;
}
.form {
max-width: 50%;
margin-bottom: 1rem;
}
.form {
display: block;
width: 100%;
height: calc(1.5em + 0.75rem + 2px);
padding: 0.375rem 0.75rem;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #495057;
background-color: #fff;
background-clip: padding-box;
border: 1px solid #ced4da;
border-radius: 10px;
align-items: center;
}
#message {
height: 200px;
}
.btn {
border-radius: 10px;
height: 50px;
background-color: #9BA7C0;
border-color: transparent;
width: 175px;
font-size: 1rem;
}
div.frm {
display: block;
text-align: center;
}
form {
display: inline-block;
margin-left: auto;
margin-right: auto;
text-align: center;
width: 100%;
}
<section>
<div class="boite-1">
<section class="contacter">
<h1>CONTACTER L'ETUDE</h1>
<div class="formulaire">
<form class="frm">
<div class="row">
<div class="frm-col">
<input type="text" class="form" name="nom" id="nom" placeholder="Nom*">
</div>
</div>
<div class="row">
<div class="frm-col">
<input type="text" class="form" name="societe" id="societe" placeholder="Société">
</div>
</div>
<div class="row">
<div class="frm-col">
<input type="text" class="form" name="mail" id="mail" placeholder="Adresse mail*">
</div>
</div>
<div class="row">
<div class="frm-col">
<input type="text" class="form" name="tel" id="tel" placeholder="Téléphone*">
</div>
</div>
<div class="row">
<div class="frm-col">
<textarea class="form" name="message" id="message" cols="30" rows="7" placeholder="Message*"></textarea>
</div>
</div>
<div class="row">
<div class="sbmt">
<input type="submit" value="Envoyer la demande" class="btn">
<span class="demande envoyée"></span>
</div>
</div>
</form>
</div>
</section>
</div>
</section>
you can use
.frm-col {
display: flex;
justify-content: center;
}
In Your css file replace the .contacter with this below
.contacter {
width: 90%;
margin: 5%;
text-align: center;
padding-top: 0px;
width:100%;
display: flex;
align-items: center;
justify-content: center;
}
This will solve your issue
for more info on flex : https://css-tricks.com/snippets/css/a-guide-to-flexbox/
.formulaire{
margin: auto;
padding-top: 0;
width: 90%; // try using a fixed with if it is still not working
}
or
.frm-col{
display: flex;
justify-content: center;
}

how can i cover the whole separator container?

My image separator covers the whole separator container on my first 2 html. But it doesn't work on the third one. On the third html there are 8 div rows and in each row there are 3 div columns. Some selectors are not found on the given css because i use it for 4 htmls
/*----------------REMINDERS------------------*/
/*Standard rule: Styles and layout of a webpage
should look like itself until window reaches 992px*/
/* To test responsiveness:
> On browser: press f12 to see dev tools
> click on the second icon to toggle responsive layout
> set width to 992px and leave the height to blank to get the max height of current window
(You can also choose desired device to test with.
Just click the dropdown beside current window width)
*/
/*Now on 991px, the design and layout should change to mobile view*/
/*Read more about "CSS Media Queries" to control styles on specific window sizes*/
/*------------------------------------------*/
/*Reset all styles of elements*/
*{
margin: 0;
padding: 0;
}
/*Observe this container on sections*/
.main-container {
width: 80%; /*This will always get the 80% of the body*/
margin: auto; /*To center element*/
}
/*Navigation*/
nav {
font-size: 0;
background-color: #ffdead;
position: fixed; /*Navigation will stay on top even on scroll*/
width: 100%;
box-shadow: -1px -8px 9px 9px; /*Shadow under navigation, this gives illusion that this element float*/
/*The z-index property specifies the stack order of an element.
An element with greater stack order is always in front of an element with a lower stack order.*/
z-index:2; /*This will force other elements to stay on lower stack (higher numbers will do)*/
}
nav ul a li {
/*tdisplay: inline-block;o position li horizontally
(if this cause problems, you may use "vertical-align: top;" so it will stay at the same vertical position )*/
display: inline-block;
/*vertical-align: top;*/
padding: 10px;
transition: all .5s; /*animate on hover*/
}
nav ul a li:hover {
color: maroon;
}
nav ul a {
font-family: Garamond;
font-size: 20px;
font-weight: bolder;
color: maroon;
text-decoration: none;
text-transform: uppercase;
letter-spacing: 0;
}
li.active {
border-bottom: 5px solid maroon;
color: black;
}
/*Banner*/
.banner-container {
background-image: url("../images/banner.jpg");
background-size: cover; /*This will cover the whole container even on window resize*/
background-repeat: no-repeat;
background-attachment: fixed; /*To create parallax effect*/
background-position: bottom;
height: 370px;
}
/*Welcome*/
.welcome-container {
font-size: 35px;
padding-top: 70px;
text-align: center;
}
.welcome-container h1 {
letter-spacing: 3px; /*to adjust letter spacing*/
border-bottom: 2px solid #ffdead;
color: maroon;
padding-bottom: 20px;
font-size: 30px;
/*Set texts to uppercase*/
text-transform: uppercase; /*Always rely to set text-transform on styles and not directly to HTML*/
}
.welcome-container p {
margin-top: 20px;
color: maroon;
padding: 15px;
font-size: 18px;
}
/*Articles*/
.articles {
font-size: 0;
padding-top: 200px;
}
.articles h1 {
letter-spacing: 3px;
text-transform: uppercase;
border-bottom: 2px solid #e59866;
color: maroon;
padding-bottom: 20px;
margin-bottom: 20px;
font-size: 30px;
text-align: center;
}
.article-item-container {
width: 33.33%; /*To get 1/3 of the .main-container*/
margin-top: 20px;
display: inline-block;
vertical-align: top;
}
.article-box {
background: #ffdead;
border-radius: 5px;
width: 90%; /*Get 90% width from 33.33%*/
margin: auto;
transition: all .325s; /*Animate on hover*/
}
.article-box:hover {
background: #f0b27a;
color: maroon;
}
/* ".article-content a" (child element of ".article-box") will
change color whenever mouse hovers on ".article-box" (parent element of ".article-content a") */
.article-box:hover .article-content a {
color: maroon;
}
.article-title {
font-size: 20px;
text-transform: uppercase;
text-align: center;
padding-top: 20px;
letter-spacing: 3px;
}
.article-content {
font-size: 13px;
text-align: center;
padding: 20px 5px;
}
.article-content a {
font-size: 12px;
margin-left: 5px;
color: gray;
text-decoration: none;
font-style: italic;
transition: all .325s;
}
div.row.column.text {
text-align: left;
background-color: maroon;
color: darkgray;
}
.row {
display: flex;
flex-wrap: wrap;
padding: 0 4px;
}
.row .column input[type=text] {
background-color: #212121;
border: none;
color: white;
padding: 1px 5px;
text-align: right;
text-decoration: none;
display: inline-block;
font-size: 10px;
width: 86px;
height: 35px;
}
div input[type=button] {
background-color: #7b241c;
border: none;
color: white;
padding: 1px 5px;
text-align: center;
text-decoration: none;
font-size: 1px;
width: 85px;
height: 30px;
position: relative;
}
h6 {
text-align: left;
text-transform: uppercase;
font-family: Verdana;
font-size: 10px;
color: maroon;
}
h5 {
font-size: 14px;
font-family: Garamond;
color: black;
text-align: auto;
text-transform: uppercase;
}
h3 {
padding-top: 3px;
text-align: center;
font-size: 15px;
margin-left: 5px;
color: maroon;
text-decoration: none;
font-family: Georgia;
}
/* Create four equal columns that sits next to each other */
.column {
flex: 25%;
max-width: 25%;
padding: 0 4px;
}
.column img {
margin-top: 8px;
vertical-align: middle;
}
/* Responsive layout - makes a two column-layout instead of four columns */
#media screen and (max-width: 800px) {
.column {
flex: 50%;
max-width: 50%;
}
}
/* Responsive layout - makes the two columns stack on top of each other instead of next to each other */
#media screen and (max-width: 600px) {
.column {
flex: 100%;
max-width: 100%;
}
}
.row{
display: flex;
padding-top: 20px;
}
.column {
flex: 33.33%;
padding: 5px;
margin:auto;
}
/*Image Separator*/
.separator-container {
margin-top: 40px;
background-image: url("../images/background.jpg");
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed; /*Same effect on banner*/
background-position: center;
height: 400px;
}
/*Set dark overlay on separator*/
.overlay {
background-color: ;
opacity: .8; /*To adjust tranparency, this only accept values from .1 to 1*/
width: 100%; /*Get full width of container ".separator-container" */
height: 100%; /*Get full height of container ".separator-container" */
}
/*Contact*/
.contact-container {
font-size: 0px;
margin-top: 40px;
}
.contact-container h1 {
font-size: 30px;
text-transform: uppercase;
color: maroon;
letter-spacing: 3px;
}
.contact-container form {
margin-top: 20px;
}
.contact-field {
width: 33.33%; /*Get 1/3 of .main-container*/
display: inline-block;
vertical-align: top;
}
.contact-field input {
width: 90%; /*Get 90% from 1/3 set of its container ".contact-field" */
padding: 10px;
border: 3px solid #ffdead;
color: black;
/*Try to remove this style "outline: none;" and click on the input*/
/*You should see a color blue outline*/
outline: none; /*use this to remove blue outline*/
margin-bottom: 10px;
transition: all .325s;
}
/* ":focus" executes when user clicks on an input*/
.contact-field input:focus {
border: 3px solid #f0b27a;
color: maroon;
}
.contact-field-full {
width: 100%;
}
.contact-field-full input {
float: right; /*Set to right of container ".contact-field-full"*/
margin-right: 12px; /*Adjust to align to the Message input*/
width: 20%; /*Always get 20% of container ".contact-field-full" */
padding: 10px;
margin-bottom: 10px;
outline: none;
border: none;
transition: all .325s;
cursor: pointer; /*To get a hand cursor*/
background-color: #ffdead;
}
.contact-field-full input:hover {
background: #f0b27a;
color: maroon;
}
<!DOCTYPE html>
<html>
<head>
<title>Shawn Mendes </title>
<!-- Call external CSS file -->
<link rel="stylesheet" type="text/css" href="css/blog.css">
<link rel="stylesheet" type="text/css" href="css/style-media-queries.css">
<!-- Meta tag viewport helps browser window to render webpages for mobile devices -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<nav>
<ul>
<!-- Always put title on anchor tags and don't leave blank hrefs -->
<a href="index.html" title="Home">
<li>Home</li>
</a>
<a href="about.html" title="Music">
<li>Music</li>
</a>
<a href="blog.html" title="Tour">
<li class="active">Tour</li>
</a>
<a href="register.html" title="Video">
<li>Video</li>
</a>
</ul>
</nav>
<section class="banner-container">
</section>
<div class="main-container">
<section class="welcome-container">
<h1>ON TOUR</h1>
</section>
<div class="row">
<div class="column">
<input type="text" name="MAR 7" value="MAR 7">
</div>
<div class="column">
<div class="caption">
<h6>Ziggo Dome</h6>
<h5>NIEUW-AMSTERDAM, NETHERLANDS</h5>
</div>
</div>
<div class="column">
<input type="button" name="RSVP" value="RSVP">
<input type="button" name="VIP" value="VIP">
<input type="button" name="TICKETS" value="TICKETS">
</div>
</div>
<div class="row">
<div class="column">
<input type="text" name="MAR 8" value="MAR 8">
</div>
<div class="column">
<div class="caption">
<h6>Ziggo Dome</h6>
<h5>NIEUW-AMSTERDAM, NETHERLANDS</h5>
</div>
</div>
<div class="column">
<input type="button" name="RSVP" value="RSVP">
<input type="button" name="VIP" value="VIP">
<input type="button" name="TICKETS" value="TICKETS">
</div>
</div>
<div class="row">
<div class="column">
<input type="text" name="MAR 10" value="MAR 10">
</div>
<div class="column">
<div class="caption">
<h6>ANTWERPS SPORTPALEIS</h6>
<h5>ANTWERP, BELGIUM</h5>
</div>
</div>
<div class="column">
<input type="button" name="RSVP" value="RSVP">
<input type="button" name="VIP" value="VIP">
<input type="button" name="TICKETS" value="TICKETS">
</div>
</div>
<div class="row">
<div class="column">
<input type="text" name="MAR 11" value="MAR 11">
</div>
<div class="column">
<div class="caption">
<h6>MERCEDES-BENZ ARENA</h6>
<h5>BERLIN-FRIEDRICHSHAIN, GERMANY</h5>
</div>
</div>
<div class="column">
<input type="button" name="RSVP" value="RSVP">
<input type="button" name="VIP" value="VIP">
<input type="button" name="TICKETS" value="TICKETS">
</div>
</div>
<div class="row">
<div class="column">
<input type="text" name="MAR 13" value="MAR 13">
</div>
<div class="column">
<div class="caption">
<h6>OSLO SPEKTRUM ARENA</h6>
<h5>OSLO, NORWAY</h5>
</div>
</div>
<div class="column">
<input type="button" name="RSVP" value="RSVP">
<input type="button" name="VIP" value="VIP">
<input type="button" name="TICKETS" value="TICKETS">
</div>
</div>
<div class="row">
<div class="column">
<input type="text" name="MAR 15" value="MAR 15">
</div>
<div class="column">
<div class="caption">
<h6>ERICSSON GLOBE</h6>
<h5>STOCKHOLM, SWEDEN</h5>
</div>
</div>
<div class="column">
<input type="button" name="RSVP" value="RSVP">
<input type="button" name="VIP" value="VIP">
<input type="button" name="TICKETS" value="TICKETS">
</div>
</div>
<div class="row">
<div class="column">
<input type="text" name="MAR 16" value="MAR 16">
</div>
<div class="column">
<div class="caption">
<h6>ROYAL ARENA</h6>
<h5>COPENHAGEN, DENMARK</h5>
</div>
</div>
<div class="column">
<input type="button" name="RSVP" value="RSVP">
<input type="button" name="VIP" value="VIP">
<input type="button" name="TICKETS" value="TICKETS">
</div>
</div>
<div class="row">
<div class="column">
<input type="text" name="MAR 18" value="MAR 18">
</div>
<div class="column">
<div class="caption">
<h6>LANXESS ARENA</h6>
<h5>KOLN,GERMANY</h5>
</div>
</div>
<div class="column">
<input type="button" name="RSVP" value="RSVP">
<input type="button" name="VIP" value="VIP">
<input type="button" name="TICKETS" value="TICKETS">
</div>
</div>
<section class="separator-container">
<div class="overlay"></div>
</section>
<div class="main-container">
<section class="contact-container">
<h1>Get Updates</h1>
<form method="GET" action="#">
<div class="contact-field">
<input type="text" name="full-name" placeholder="Email Address" required/>
</div>
<div class="contact-field">
<input type="text" name="email-address" placeholder="Postal Code" required/>
</div>
<div class="contact-field">
<input type="text" name="message" placeholder="Country" required/>
</div>
<div class="contact-field-full">
<input type="submit" name="submit" value="Submit"/>
</div>
</form>
<h3>By submitting this form, you agree to our privacy policy </h3>
<h3> Disclaimer: The owner of this website does not own any of its images and contents. Credits to the rigtful owner. </h3>
</section>
</div>
</body>
</html>

divs overlapping each other

* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body {
background-color: #25274D;
font-family: "Trebuchet MS";
}
.link {
text-decoration: none;
color: whitesmoke;
float: left;
font-size: 20px;
font-weight: 700;
padding-right: 1vw;
padding-left: 1vw;
display: block;
transition: 0.4s;
height: 100%;
}
.link:hover {
background-color: #464866;
color: #2E9CCA;
}
a:link,
a:visited {
line-height: 7vh;
}
#top__nav {
text-decoration: none;
top: 0;
position: fixed;
width: 100%;
z-index: 10;
background-color: darkblue;
left: 0;
}
#top__nav__menu {
display: flex;
justify-content: flex-end;
padding-right: 20px;
list-style-type: none;
background-color: darkblue;
}
#logo {
float: left;
position: absolute;
left: 1vw;
}
.Gallery {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
margin-top: 10vh;
position: relative;
}
.revealCard {
position: relative;
background-color: #25274D;
width: 45%;
height: 400px;
z-index: 1;
float: left;
border: 1px solid #464866;
perspective: 1000;
margin: 20px;
}
.card {
width: 100%;
height: 100%;
transform-style: preserve-3d;
transition: all 0.4s linear;
}
.revealCard:hover .card {
transform: rotateY(180deg);
}
.face {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
color: #2E9CCA;
text-align: center;
font-size: 30px;
}
.face.back {
display: block;
transform: rotateY(180deg);
color: #2E9CCA;
text-align: center;
box-sizing: border-box;
padding: 20px auto;
}
.img {
width: 100%;
height: 100%;
}
#dynamicText {
max-width: 100%;
height: 30vh;
font-size: 40px;
}
.appearOnScroll {
color: #2E9CCA;
text-align: center;
padding: 20px 0;
}
#form {
margin-top: 90px;
display: block;
position: relative;
}
.form__fields {
margin-right: 20px;
color: #2E9CCA;
font-size: 25px;
padding: 20px;
}
.input {
position: absolute;
left: 20vw;
line-height: 30px;
color: black;
}
.input:focus {
background-color: #2E9CCA;
color: #25274D;
}
.star {
color: #2E9CCA;
}
.Fields {
padding-top: 20px;
}
<div id="top__nav">
<div id="card">
<ul id="top__nav__menu">
<img id="logo" src="NewProject/Logo.png">
<li><a class="link" href="#">Home</a></li>
<li><a class="link" href="#">Free Trial</a></li>
<li><a class="link" href="#">Samples</a></li>
<li><a class="link" href="#">Q-Bank</a></li>
<li><a class="link" href="#">Help</a></li>
</ul>
</div>
</div>
<div class="Gallery">
<div class="revealCard">
<div class="card">
<div class="face">
<p>Hey, hover to see the image.</p>
</div>
<div class="back face center">
<img class="img" src="https://images.unsplash.com/photo-1419064642531-e575728395f2?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=67fd942ed774f3de1db50cf3dd0065eb&w=1000&q=80">
</div>
</div>
</div>
<div class="revealCard">
<div class="card">
<div class="face">
<img class="img" src="https://i.ytimg.com/vi/TdpBRZ0dZhw/maxresdefault.jpg">
</div>
<div class="back face center">
<p>Here are the details of the image! Here are the details of the image! Here are the details of the image!</p>
</div>
</div>
</div>
<div class="revealCard">
<div class="card">
<div class="face">
<img class="img" src="https://images.unsplash.com/photo-1419064642531-e575728395f2?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=67fd942ed774f3de1db50cf3dd0065eb&w=1000&q=80">
</div>
<div class="back face center">
<p>Here are the details of the image! Here are the details of the image! Here are the details of the image!</p>
</div>
</div>
</div>
<div class="revealCard">
<div class="card">
<div class="face">
<p>Hey, hover to see the image.</p>
</div>
<div class="back face center">
<img class="img" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRcrkTylq_NcR1xOsclrGiDsbEPFpRFlLK_UxpB4zuF9O3Uvwu5">
</div>
</div>
</div>
</div>
<div id="dynamicText">
<p class="appearOnScroll">See the magic below!</p>
<p class="appearOnScroll">Signup For Your Free Beta Trial Today!</p>
<p class="appearOnScroll">This text appears on scroll</p>
<p class="appearOnScroll">This text appears on scroll</p>
<p class="appearOnScroll">This text appears on scroll</p>
</div>
<div id="form">
<form action="">
<div class="Fields">
<label class="form__fields">Full Name :<span class="star"> * </span></label>
<input class="input" type="text" name="full_name" placeholder="Enter your name" required><br/>
</div>
<div class="Fields">
<label class="form__fields">Address line 1:<span class="star"> * </span></label>
<input class="input" type="text" name="address_line_1" placeholder="Address line 1" required><br/>
</div>
<div class="Fields">
<label class="form__fields">Address line 2:</label>
<input class="input" type="text" name="address_line_2" placeholder="Address line 2"><br/>
</div>
<div class="Fields">
<label class="form__fields">Address line 3:</label>
<input class="input" type="text" name="address_line_3" placeholder="Address line 3"><br/>
</div>
<div class="Fields">
<label class="form__fields">Email :<span class="star"> * </span></label>
<input class="input" type="email" name="email" placeholder="Enter your E-mail" required><br/>
</div>
</form>
</div>
The form is coming on top of the text in the div #dynamicText, I have tried many things like removing position:absolute from or clear:both from everywhere but I couldn't fix it. Please help. Also it would be nice if I have to change the css properties of form element only. Thanks in advance.
The height property in the #dynamicText seems to be giving trouble. Removing it takes out the overlap. Alternatively, using min-height instead works as well.
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body {
background-color: #25274D;
font-family: "Trebuchet MS";
}
.link {
text-decoration: none;
color: whitesmoke;
float: left;
font-size: 20px;
font-weight: 700;
padding-right: 1vw;
padding-left: 1vw;
display: block;
transition: 0.4s;
height: 100%;
}
.link:hover {
background-color: #464866;
color: #2E9CCA;
}
a:link,
a:visited {
line-height: 7vh;
}
#top__nav {
text-decoration: none;
top: 0;
position: fixed;
width: 100%;
z-index: 10;
background-color: darkblue;
left: 0;
}
#top__nav__menu {
display: flex;
justify-content: flex-end;
padding-right: 20px;
list-style-type: none;
background-color: darkblue;
}
#logo {
float: left;
position: absolute;
left: 1vw;
}
.Gallery {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
margin-top: 10vh;
position: relative;
}
.revealCard {
position: relative;
background-color: #25274D;
width: 45%;
height: 400px;
z-index: 1;
float: left;
border: 1px solid #464866;
perspective: 1000;
margin: 20px;
}
.card {
width: 100%;
height: 100%;
transform-style: preserve-3d;
transition: all 0.4s linear;
}
.revealCard:hover .card {
transform: rotateY(180deg);
}
.face {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
color: #2E9CCA;
text-align: center;
font-size: 30px;
}
.face.back {
display: block;
transform: rotateY(180deg);
color: #2E9CCA;
text-align: center;
box-sizing: border-box;
padding: 20px auto;
}
.img {
width: 100%;
height: 100%;
}
#dynamicText {
max-width: 100%;
/*height: 30vh;*/
font-size: 40px;
}
.appearOnScroll {
color: #2E9CCA;
text-align: center;
padding: 20px 0;
}
#form {
margin-top: 90px;
display: block;
position: relative;
}
.form__fields {
margin-right: 20px;
color: #2E9CCA;
font-size: 25px;
padding: 20px;
}
.input {
position: absolute;
left: 20vw;
line-height: 30px;
color: black;
}
.input:focus {
background-color: #2E9CCA;
color: #25274D;
}
.star {
color: #2E9CCA;
}
.Fields {
padding-top: 20px;
}
<div id="top__nav">
<div id="card">
<ul id="top__nav__menu">
<img id="logo" src="NewProject/Logo.png">
<li><a class="link" href="#">Home</a></li>
<li><a class="link" href="#">Free Trial</a></li>
<li><a class="link" href="#">Samples</a></li>
<li><a class="link" href="#">Q-Bank</a></li>
<li><a class="link" href="#">Help</a></li>
</ul>
</div>
</div>
<div class="Gallery">
<div class="revealCard">
<div class="card">
<div class="face">
<p>Hey, hover to see the image.</p>
</div>
<div class="back face center">
<img class="img" src="https://images.unsplash.com/photo-1419064642531-e575728395f2?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=67fd942ed774f3de1db50cf3dd0065eb&w=1000&q=80">
</div>
</div>
</div>
<div class="revealCard">
<div class="card">
<div class="face">
<img class="img" src="https://i.ytimg.com/vi/TdpBRZ0dZhw/maxresdefault.jpg">
</div>
<div class="back face center">
<p>Here are the details of the image! Here are the details of the image! Here are the details of the image!</p>
</div>
</div>
</div>
<div class="revealCard">
<div class="card">
<div class="face">
<img class="img" src="https://images.unsplash.com/photo-1419064642531-e575728395f2?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=67fd942ed774f3de1db50cf3dd0065eb&w=1000&q=80">
</div>
<div class="back face center">
<p>Here are the details of the image! Here are the details of the image! Here are the details of the image!</p>
</div>
</div>
</div>
<div class="revealCard">
<div class="card">
<div class="face">
<p>Hey, hover to see the image.</p>
</div>
<div class="back face center">
<img class="img" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRcrkTylq_NcR1xOsclrGiDsbEPFpRFlLK_UxpB4zuF9O3Uvwu5">
</div>
</div>
</div>
</div>
<div id="dynamicText">
<p class="appearOnScroll">See the magic below!</p>
<p class="appearOnScroll">Signup For Your Free Beta Trial Today!</p>
<p class="appearOnScroll">This text appears on scroll</p>
<p class="appearOnScroll">This text appears on scroll</p>
<p class="appearOnScroll">This text appears on scroll</p>
</div>
<div id="form">
<form action="">
<div class="Fields">
<label class="form__fields">Full Name :<span class="star"> * </span></label>
<input class="input" type="text" name="full_name" placeholder="Enter your name" required><br/>
</div>
<div class="Fields">
<label class="form__fields">Address line 1:<span class="star"> * </span></label>
<input class="input" type="text" name="address_line_1" placeholder="Address line 1" required><br/>
</div>
<div class="Fields">
<label class="form__fields">Address line 2:</label>
<input class="input" type="text" name="address_line_2" placeholder="Address line 2"><br/>
</div>
<div class="Fields">
<label class="form__fields">Address line 3:</label>
<input class="input" type="text" name="address_line_3" placeholder="Address line 3"><br/>
</div>
<div class="Fields">
<label class="form__fields">Email :<span class="star"> * </span></label>
<input class="input" type="email" name="email" placeholder="Enter your E-mail" required><br/>
</div>
</form>
</div>
Remove the height of the dynamicTest div which is set to 30vh. The overlapping divs is caused due to that property.

One of my child Div's refuses to be centered with text-align:Center

I'm having a strange issue, I simply want to vertically and horizontally center my parent div while maintaining a left align child div (text,divs, etc.).
This is what I want:
But when I tried to add a text-align:center to the parent container this is what I got instead:
This is my Fiddle without the text-align:center, I've been working on this for too many days, and no matter what I do I can't keep the text left aligned when they they center, and the child div (numbers) refuse to center. Can someone please show me how to correctly vertically and horizontally center my Parent container while maintaining the left alignment?
Here's my CSS:
.bigwrapper {display:table; height:100vh; width: 100%; }
.listwrapper {background:#fff; vertical-align:middle!important;display:table-cell; }
.point {
padding-bottom: 10px;
padding-top: 10px;
white-space: nowrap;
}
.message {
display: inline-block;
}
.title {
color: black;
white-space: normal;
margin-right: 60px; font-size:19px;
}
.info {
color: #999;
white-space: normal;
margin-right: 60px; margin-top:5px;
}
.number {
font: 36px Arial, sans-serif;
width: 46px;
height: 46px;vertical-align:bottom;
margin-right: 10px; margin-top:5px;
float: left;
text-align: center;
}
.number {
border-radius: 50%;
behavior: url(PIE.htc);
/* remove if you don't care about IE8 */
background: #333;
border: 2px solid #333;
color: #fff;
text-align: center;
}
.listwrapper p {
font-size: 13px !important; font-weight:bold; color:#333;
}
.listwrapper .form-control {min-width:100%!important; height:35px; font-size:13px; padding-top:0px; padding-bottom:0px; display:inline-block;}
.listwrapper .btn {min-width:100%!important; display:block; height:35px; font-size:12px; margin-top:10px;}
.listwrapper .btn {background:#333 !important; color:#fff !important; font-weight:bold;}
.listwrapper .btn:hover {background:#000 !important; color:#fff !important;}
HTML
<div class="bigwrapper">
<div class="listwrapper">
<div class="point">
<div class="number">1</div>
<div class="message">
<div class="title">Upload your media and get discovered</div>
<div class="info">Share, find, buy, or sell any type of content with the help of filters</div>
</div>
</div>
<div class="point">
<div class="number">2</div>
<div class="message">
<div class="title">Represent your city everytime you post</div>
<div class="info">Raise local awareness with tags linked to content in your area</div>
</div>
</div>
<div class="point">
<div class="number">3</div>
<div class="message">
<div class="title">Make real connections with users nearby</div>
<div class="info">Connect with neighbors, friends, fans, and rising stars in your city</div>
</div>
</div>
<div class="point">
<div class="number">4</div>
<div class="message">
<div class="title">Get started by typing your email address</div>
<div class="guestlist">
<form class="guestlist-form form-inline" action="signup" method="post">
<input name="emailaddress" class="form-control input-lg" id="enterfield" type="email" title="Enter Email Address" class="guestlistfield" placeholder="Enter your Email" />
<input class="button btn-lg btn" title="Enter Email" name="submit" type="submit" autofocus="autofocus" value="Sign up!">
</form>
<div id="error-message"></div><span class="spam">Don't worry we won't spam</span>
</div>
</div>
</div>
</div>
</div>
You can add display: flex; align-items: center; justify-content: center; to .bigwrapper to center the element that holds all of that content .listwrapper.
align-items: center will vertically center .listwrapper inside of .bigwrapper and justify-content: center; will horizontally align it.
.point {
padding-bottom: 10px;
padding-top: 10px;
white-space: nowrap;
}
.message {
display: inline-block;
}
.title {
color: black;
white-space: normal;
margin-right: 60px;
font-size: 19px;
}
.info {
color: #999;
white-space: normal;
margin-right: 60px;
margin-top: 5px;
}
.number {
font: 36px Arial, sans-serif;
width: 46px;
height: 46px;
vertical-align: bottom;
margin-right: 10px;
margin-top: 5px;
float: left;
text-align: center;
}
.number {
border-radius: 50%;
behavior: url(PIE.htc);
/* remove if you don't care about IE8 */
background: #333;
border: 2px solid #333;
color: #fff;
text-align: center;
}
.listwrapper p {
font-size: 13px !important;
font-weight: bold;
color: #333;
}
.listwrapper .form-control {
min-width: 100%!important;
height: 35px;
font-size: 13px;
padding-top: 0px;
padding-bottom: 0px;
display: inline-block;
}
.listwrapper .btn {
min-width: 100%!important;
display: block;
height: 35px;
font-size: 12px;
margin-top: 10px;
}
.listwrapper .btn {
background: #333 !important;
color: #fff !important;
font-weight: bold;
}
.listwrapper .btn:hover {
background: #000 !important;
color: #fff !important;
}
.bigwrapper {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
height: 100vh;
width: 100%;
}
.listwrapper {
background: #fff;
vertical-align: middle!important;
display: table-cell;
}
<body>
<div class="bigwrapper">
<div class="listwrapper">
<div class="point">
<div class="number">1</div>
<div class="message">
<div class="title">Upload your media and get discovered</div>
<div class="info">Share, find, buy, or sell any type of content with the help of filters</div>
</div>
</div>
<div class="point">
<div class="number">2</div>
<div class="message">
<div class="title">Represent your city everytime you post</div>
<div class="info">Raise local awareness with tags linked to content in your area</div>
</div>
</div>
<div class="point">
<div class="number">3</div>
<div class="message">
<div class="title">Make real connections with users nearby</div>
<div class="info">Connect with neighbors, friends, fans, and rising stars in your city</div>
</div>
</div>
<div class="point">
<div class="number">4</div>
<div class="message">
<div class="title">Get started by typing your email address</div>
<div class="guestlist">
<form class="guestlist-form form-inline" action="signup" method="post">
<input name="emailaddress" class="form-control input-lg" id="enterfield" type="email" title="Enter Email Address" class="guestlistfield" placeholder="Enter your Email" />
<input class="button btn-lg btn" title="Enter Email" name="submit" type="submit" autofocus="autofocus" value="Sign up!">
</form>
<div id="error-message"></div><span class="spam">Don't worry we won't spam</span>
</div>
</div>
</div>
</div>
</div>
</body>
You can set child div-s to be display:inline-block; and then for it parent width:100%;text-align:center;
But to center them vertically You need to use jQuery or redesign Your layout and set left element and right element to be display:inline-block in one container with text-align:center; and then use vertical-align property for left and right element.
Try modifying the css for the "big-wrapper" class to:
.bigwrapper {
position: relative;
top: 50%;
left: 50%;
display: table;
}

Wizard reponsiveness issue

I am creating following wizard.
I have tried following; but its not working as it should be. Its layout disturbs while resizing window. It should be responsive. What can be best way to implement it so that it should remain Responsive despite whatever resolution is.
Fiddle with issue
HTML:
<div class="col-md-10">
<div class="wizard-wrapper">
<div class="node-wrapper text-center wactive">
<div class="node"><span>1</span>
</div>
<label class="lbl-wizard">Singn Up</label>
</div>
<div class="node-wrapper text-center">
<div class="node"><span>2</span>
</div>
<label class="lbl-wizard">Order Info</label>
</div>
<div class="node-wrapper text-center">
<div class="node"><span>3</span>
</div>
<label class="lbl-wizard">Preview Info</label>
</div>
<div class="node-wrapper text-center">
<div class="node"><span>4</span>
</div>
<label class="lbl-wizard">Payment Method</label>
</div>
<div class="node-wrapper text-center">
<div class="node"><span>5</span>
</div>
<label class="lbl-wizard">Complete Order Info</label>
</div>
<div class="connection"></div>
</div>
</div>
CSS
/* wizard */
.wizard h2 {
margin-top: 5px;
}
.node {
background: #2d2f32;
border-radius: 30px;
color: #fff;
display: inline-block;
height: 37px;
text-align: center;
width: 37px;
border: 4px solid #C2C6C9;
}
.wactive .node {
background: #AA0405;
}
.node > span {
display: inline-block;
font-size: 14px;
padding-top: 4px;
font-family: open_sansbold;
}
.lbl-wizard {
display: block;
font-family: open_sansregular;
font-size: 14px;
color: #2d2f32;
padding-top: 5px;
}
.node-wrapper.text-center {
float: left;
padding: 0 5%;
position: relative;
z-index: 1;
}
.connection {
background: #c2c6c9;
display: inline-block;
height: 5px;
margin-top: -113px;
padding-top: 7px;
position: relative;
vertical-align: middle;
width: 100%;
z-index: 0;
}
FYI: I am using bootstrap.
You can set the width of a node.wrapper element to one fifth of the resolution width.
width: calc(100% / 5);
Also, you should change .connection so it stays at one position:
.connection {
background: #c2c6c9;
display: block; (new)
height: 5px;
margin-top: 38px; (new)
padding-top: 7px;
position: absolute; (new)
vertical-align: middle;
width: 100%;
z-index: 0;
}
Fiddle