divs overlapping each other - html

* {
-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.

Related

I want to join 2 html pages but getting distorted output

I have two html pages one for navbar and other for contact form, when i try to join them both i get distorted single page. Image will be included below. I tried making section but its not helping out:/
This is for a django project so codes might b slightly different. Thanks in advance :)
html of navbar
<nav>
<div class="logo">
<a class="h4" href="{% url 'home' %}">Nihaal Nz</a>
</div>
<ul class="nav-links">
<li>About</li>
<li>Cool Cloud</li>
<li>Contact</li>
</ul>
</nav>
html of contact page
<div class="container">
<form class="shake" action="{% url 'contact' %}" role="form" method="post" id="contactForm"
name="contact-form" data-toggle="validator">
{% csrf_token %}
<h2>Let me know what you felt.</h2>
<div class="row100">
<div class="col">
<div class="inputBox">
<input type="text" name="name" required="required">
<span class="text">First Name</span>
<span class="line"></span>
</div>
</div>
</div>
<div class="row100">
<div class="col">
<div class="inputBox">
<input type="text" name="email" required="required">
<span class="text">Email</span>
<span class="line"></span>
</div>
</div>
<div class="col">
<div class="inputBox">
<input type="text" name="subject" required="required">
<span class="text">Subject</span>
<span class="line"></span>
</div>
</div>
</div>
<div class="row100">
<div class="col">
<div class="inputBox textarea">
<textarea name="message" required data-error="Write your message"></textarea>
<span class="text">Type your message here...</span>
<span class="line"></span>
</div>
</div>
</div>
<div class="row100">
<div class="col">
<input type="submit" value="Send">
</div>
</div>
</div>
combined html code
{% load static %}
<link rel="stylesheet" href="{% static "portofolio/css/contacts.css" %}">
{% block content %}
<body>
<section>
<nav>
<div class="logo">
<a class="h4" href="{% url 'home' %}">Nihaal Nz</a>
</div>
<ul class="nav-links">
<li>About</li>
<li>Cool Cloud</li>
<li>Contact</li>
</ul>
</nav>
</section>
<div class="container">
<form class="shake" action="{% url 'contact' %}" role="form" method="post" id="contactForm"
name="contact-form" data-toggle="validator">
{% csrf_token %}
<h2>Let me know what you felt.</h2>
<div class="row100">
<div class="col">
<div class="inputBox">
<input type="text" name="name" required="required">
<span class="text">First Name</span>
<span class="line"></span>
</div>
</div>
</div>
<div class="row100">
<div class="col">
<div class="inputBox">
<input type="text" name="email" required="required">
<span class="text">Email</span>
<span class="line"></span>
</div>
</div>
<div class="col">
<div class="inputBox">
<input type="text" name="subject" required="required">
<span class="text">Subject</span>
<span class="line"></span>
</div>
</div>
</div>
<div class="row100">
<div class="col">
<div class="inputBox textarea">
<textarea name="message" required data-error="Write your message"></textarea>
<span class="text">Type your message here...</span>
<span class="line"></span>
</div>
</div>
</div>
<div class="row100">
<div class="col">
<input type="submit" value="Send">
</div>
</div>
</div>
</body>
{% endblock %}
css of navbar
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
nav {
display: flex;
justify-content: space-around;
align-items: center;
min-height: 12vh;
background-color: rgba(93, 73, 84,0.5);
font-family: 'Poppins', sans-serif;
}
.logo {
color: rgb(226,226,226);
text-transform: uppercase;
letter-spacing: 5px;
font-size: 20px;
text-decoration: none;
}
.nav-links{
display: flex;
justify-content: space-around;
width: 30%;
}
.nav-links li{
list-style: none;
}
.nav-links a{
color: rgb(226,226,226);
text-decoration: none;
letter-spacing: 3px;
font-weight: bold;
font-size: 14px;
}
.h4{
text-decoration: none;
color: rgb(226,226,226)
}
css of contact page
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #051115;
font-family: 'Poppins', sans-serif;
}
.container {
width: 80%;
padding: 20px;
}
.container h2{
width: 100%;
color: #45f3ff;
font-size: 36px;
text-align: center;
margin-bottom: 10px;
}
.container .row100{
position: relative;
width: 100%;
display: grid;
grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
}
.container .row100 .col {
position: relative;
width: 100%;
padding: 0 10px;
margin: 30px 0 10px;
transition: 0.5s;
}
.container .row100 .inputBox{
position: relative;
width: 100%;
height: 40px;
color: #45f3ff;
}
.container .row100 .inputBox input,
.container .row100 .inputBox.textarea textarea{
position: absolute;
width: 100%;
height: 100%;
background: transparent;
box-shadow: none;
border: none;
outline: none;
font-size: 18px;
padding: 0 10px;
z-index: 1;
color: #000000;
}
.container .row100 .inputBox .text{
position: absolute;
top: 0;
left: 0;
line-height: 40px;
font-size: 18px;
padding: 0 10px;
display: block;
transition: 0.5s;
pointer-events: none;
}
.container .row100 .inputBox input:focus + .text,
.container .row100 .inputBox input:valid + .text {
top: -35px;
left: -10px;
}
.container .row100 .inputBox .line{
position: absolute;
bottom: 0;
display: block;
width: 100%;
height: 2px;
background: #45f3ff;
transition: 0.5s;
border-radius: 2px;
pointer-events: none;
}
.container .row100 .inputBox input:focus ~ .line,
.container .row100 .inputBox input:valid ~ .line{
height: 100%;
}
.container .row100 .inputBox.textarea{
position: relative;
width: 100%;
height: 100px;
padding: 10px 0;
}
.container .row100 .inputBox.textarea textarea{
height: 100%;
resize: none;
}
.container .row100 .inputBox textarea:focus + .text,
.container .row100 .inputBox textarea:valid + .text {
top: -35px;
left: -10px;
}
.container .row100 .inputBox textarea:focus ~ .line,
.container .row100 .inputBox textarea:valid ~ .line{
height: 100%;
}
input[type="submit"]{
border: none;
padding: 7px 35px;
cursor: pointer;
outline: none;
background: #45f3ff;
color: #000000;
font-size: 18px;
border-radius: 2px;
}
The display:flex on the body CSS is causing this, change it to block (or something else) and it should line up as you want:
body {
display: block;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #051115;
font-family: 'Poppins', sans-serif;
}

Position div in flexbox aligned layout

Below is the layout, I have used the following styles to push the footer to the bottom, it is very important the footer is anchored to the bottom:
.body {
height: 100vh;
display: flex;
flex-direction: column;
}
.container {
flex: 1 0 auto;
}
I have then used the following styles to try and position the login form vertically between the banner and the footer but is not quite right. The same layout is used by multiple forms of varying heights.
The login-layout__positioner class is my attempt to position it vertically:
.login-layout__positioner {
display: -ms-flexbox;
display: flex;
-ms-flex-pack: center;
justify-content: center;
-ms-flex-align: center;
align-items: center;
position: absolute;
top: 0%;
left: 0;
right: 0;
bottom: 0;
}
How can I vertically align the form between the banner and the footer which takes into account different heights for the middle form?
html, body, #global__root, .global__main-content {
height: 100%;
}
.login-layout__positioner {
display: -ms-flexbox;
display: flex;
align-items: center;
position: absolute;
top: -6.5%;
left: 0;
right: 0;
bottom: 0;
}
.app-layout__body {
height: 100vh;
display: flex;
flex-direction: column;
}
.app-layout__container {
flex: 1 0 auto;
}
.banner__container {
color: #fff;
background-color: #0065bd;
}
.banner__top {
padding-top: 22px;
}
.login-layout__container {
background-color: inherit;
width: 100%;
}
wrapper {
max-width: 750px;
margin: 0 auto;
padding: 0 15px;
}
.login-layout__positioner {
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.login-layout__form {
padding-left: 0;
}
.medium--eight-twelfths {
width: 66.666%;
}
.login-layout__inner__container {
padding: 0px 30px 30px;
}
.footer__footer {
text-align: left;
color: #fff;
}
.footer__footer {
padding-top: 48px;
padding-bottom: 48px;
}
.footer__footer {
font-size: 19px;
}
.footer__footer {
background-color: #0065bd;
margin-top: 48px;
text-align: center;
font-weight: 700;
font-size: 16px;
padding-top: 16px;
padding-bottom: 16px;
text-align: center;
}
.footer__footer ul {
list-style: none;
margin-left: 0;
}
.footer__footer a,
.footer__footer a:hover,
.footer__footer a:focus,
.footer__footer a:active {
outline: 0;
color: #fff;
}
<div class="app-layout__body">
<div class="wrapper login-layout__container">
<div class="banner__container">
<div class="wrapper banner__top">
<div class="grid">
<div class="grid__item large--one-third banner__grid-item-left">logo</div>
<div class="grid__item large--two-thirds ">
<h2 class="banner__heading-right"> </h2>
</div>
</div>
</div>
</div>
<div class="grid login-layout__positioner">
<div class="grid__item medium--two-thirds login-layout__form">
<div class="login-layout__inner__container">
<div class="grid">
<div class="grid__item ">
<h2 class="">Sign In</h2>
</div>
</div>
<form>
<div>
<div class="grid">
<div class="grid__item ">
<div class="form-group form-control__input">
<label for="email" id="email-label" class="label__default label__strong label__double-margin">Email</label>
<div class="input-wrapper">
<input type="text" autocomplete="off" class="input__default form-control" id="email" name="email" aria-invalid="false" aria-describedby="email-error" value="">
</div>
</div>
</div>
</div>
<div class="grid">
<div class="grid__item ">
<div class="form-group form-control__input">
<label for="password" id="password-label" class="label__default label__strong label__double-margin">Password</label>
<div class="input-wrapper ">
<input type="password" autocomplete="off" class="input__default form-control" id="password" name="password" value="">
</div>
</div>
</div>
</div>
<div class="grid login__button__container">
<div class="grid__item large--two-thirds "><a tabindex="0" href="/business/forgotten-password">Forgotten your password?</a></div>
<div class="grid__item medium--one-third ">
<button class="button__default button__primary" type="submit">LOGIN</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="footer__footer">
<div class="wrapper">
<div class="grid">
<div class="grid__item ">
<ul>
<li><a target="_blank" href="/static/about">About</a></li>
<li><a target="_blank" href="/static/accessibility">Accessibility</a></li>
<li><a target="_blank" href="/static/cookies">Cookies</a></li>
<li><a target="_blank" href="/static/privacy">Privacy</a></li>
</ul>
</div>
</div>
</div>
</footer>
Sorry, I had to remove about 80% of your div tree because I just couldn't wrap my head around so much stuff.
Here's a simple column layout with a header, a footer and a centered form.
html, body {margin:0}
.app-layout__body {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
}
header, footer {
min-height: 20vh;
background: blue;
color: white;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
footer ul li a {
color: white;
}
form {
border: green dashed 2px;
}
<div class="app-layout__body">
<header>
<div class="grid__item large--one-third banner__grid-item-left">logo</div>
</header>
<form>
<h2>Sign in</h2>
<p>Email</p>
<input>
<p>Password</p>
<input>
<button>Login</button>
</form>
<footer class="footer__footer">
<ul>
<li><a target="_blank" href="/static/about">About</a></li>
<li><a target="_blank" href="/static/accessibility">Accessibility</a></li>
<li><a target="_blank" href="/static/cookies">Cookies</a></li>
<li><a target="_blank" href="/static/privacy">Privacy</a></li>
</ul>
</footer>
</div>

Text overlapping Font Awesome Icon

I'm very happy with my contact form, however the text in the message area overlaps the icon. I find this strange because it starts off on a perfect indent but as the person writes more it goes right into the icon. Can anyone help on how to fix this tiny issue. I have added a photo. My code is below:
<!--Contact-->
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="well well-sm">
<form class="form-horizontal" method="post">
<fieldset>
<div class="form-group">
<div class="col-md-8">
<div class="input-wrapper">
<input id="fname" name="name" placeholder="Name" type="text" class="form-control">
<label for="fname" class="fa fa-user input-icon bigicon"></label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-8">
<div class="input-wrapper">
<input id="email" name="email" type="text" placeholder="Email" class="form-control">
<label for="email" class="fa fa-envelope-o input-icon bigicon"></label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-8">
<div class="input-wrapper">
<textarea class="form-control" id="message" name="message" placeholder="Message" rows="3"></textarea>
<label for="message" class="fa fa-pencil-square-o input-icon bigicon"></label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-12 text-center">
<button type="submit" class="btn btn-outline-secondary btn-md">Submit</button>
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
</div>
html{
box-sizing: border-box;}
*,
*: before,
*: after {
box-sizing: inherit;
padding: 0;
margin: 0;
}
body{background-image: url();
width: 100%;
height: 100%;
background-position: bottom center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
background-color: #464646;
font-family:"Quicksand";
font-size: 1.2em;
line-height: 1.375em;
padding: 0;
margin: 0;
background-color: #2F3A3B;
overflow-x: hidden;
-webkit-font-smoothing: antialiased;
}
navbar-brand{
height: 3em;
width: 3em;
margin-top: -8px;
border-radius: 5.0em;
margin-right: 1em;
margin-left: -5em;
margin-bottom: -8px
}
.avatar{
border-radius: 5em;
margin-right: .5em;
margin-left: 1em;
}
.intro{
display: inline-block;
width: 100%;
padding: 65px 0 65px;
background-color: #2A2332;
background-size: cover;
font-size: 1.9em;
text-align: center;
color: #FFF;
}
h1{
font-weight: medium;
text-shadow:5px 5px 10px black;
}
h4{
font-size: -.5em;
}
.row{
margin-right: 4em;
margin-left: 4em;
margin-top: .10em;
padding-bottom: -.30em;
}
.container {
margin-left: 17em;
padding-top: 1.5em;
}
.bigicon {
font-size: 35px;
color: #808080;
}
.input-icon {
position: absolute;
left: .5rem;
top: calc(50% - 0.5em);
/* Keep icon in center of input, regardless of the input height */
}
#message {
vertical-align: middle;
}
input {
padding-right:30px;
}
.form-control {
text-indent: 2rem;
width: 75%;
}
.input-wrapper {
position: relative;
}
.btn{
margin-right: 10em;
}
#media screen and (min-width: 640px){
}
#media screen and (min-width: 960px){
}
[![enter image description here][1]][1]
main {flex: 1;}
Try this snippet. I have changed the input-icon to align with your input text.
html {
box-sizing: border-box;
}
*,
*: before,
*: after {
box-sizing: inherit;
padding: 0;
margin: 0;
}
body {
background-image: url();
width: 100%;
height: 100%;
background-position: bottom center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
background-color: #464646;
font-family: "Quicksand";
font-size: 1.2em;
line-height: 1.375em;
padding: 0;
margin: 0;
background-color: #2F3A3B;
overflow-x: hidden;
-webkit-font-smoothing: antialiased;
}
navbar-brand {
height: 3em;
width: 3em;
margin-top: -8px;
border-radius: 5.0em;
margin-right: 1em;
margin-left: -5em;
margin-bottom: -8px
}
.avatar {
border-radius: 5em;
margin-right: .5em;
margin-left: 1em;
}
.intro {
display: inline-block;
width: 100%;
padding: 65px 0 65px;
background-color: #2A2332;
background-size: cover;
font-size: 1.9em;
text-align: center;
color: #FFF;
}
h1 {
font-weight: medium;
text-shadow: 5px 5px 10px black;
}
h4 {
font-size: -.5em;
}
.row {
margin-right: 4em;
margin-left: 4em;
margin-top: .10em;
padding-bottom: -.30em;
}
.container {
margin-left: 17em;
padding-top: 1.5em;
}
.bigicon {
font-size: 35px;
color: #808080;
}
.input-icon {
position: absolute;
left: .5rem;
top: .9rem;
/* Keep icon in center of input, regardless of the input height */
}
#message {
vertical-align: middle;
}
input {
padding-right: 30px;
}
input.form-control {
padding-left: 2rem;
}
.input-wrapper {
position: relative;
}
textarea.form-control {
padding-left: 2rem;
}
.btn {
margin-right: 10em;
}
#media screen and (min-width: 640px) {}
#media screen and (min-width: 960px) {}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!--Contact-->
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="well well-sm">
<form class="form-horizontal" method="post">
<fieldset>
<div class="form-group">
<div class="col-md-8">
<div class="input-wrapper">
<input id="fname" name="name" placeholder="Name" type="text" class="form-control">
<label for="fname" class="fa fa-user input-icon bigicon"></label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-8">
<div class="input-wrapper">
<input id="email" name="email" type="text" placeholder="Email" class="form-control">
<label for="email" class="fa fa-envelope-o input-icon bigicon"></label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-8">
<div class="input-wrapper">
<textarea class="form-control" id="message" name="message" placeholder="Message" rows="3"></textarea>
<label for="message" class="fa fa-pencil-square-o input-icon bigicon"></label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-12 text-center">
<button type="submit" class="btn btn-outline-secondary btn-md">Submit</button>
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
</div>

image not displaying for checkbox (css)

I'm trying to use images as checkboxes in a grid layout, but the images won't show and I'm at a loss. Here is the relevant css and html. I have double checked the image address as this has been an issue in many other posts here, but it is stored at the address being accessed.
Any help is appreciated.
body{
width: 100vw;
height: 100vh;
margin-left: auto;
margin-right: auto;
}
.container {
width: 100%;
height: 100%;
margin: 0;
}
.jumbotron {
width: 100%;
float: left;
}
.four {
width: 32vw;
float: left;
margin-left: 2%;
/*background-color: #95a5a6;*/
}
.row {
width: 100vw;
height: 20vh;
clear: both;
padding: 0px;
margin: 0px;
}
.buttonLabel {
cursor: pointer;
}
.button input[type="checkbox"] {
display: none;
}
.button input[type="checkbox"] + label {
width: 32vw;
height: 20vh;
display: inline-block;
}
#accomLabel {
background: url('../img/shelter.png') no-repeat;
}
<div class="container">
<div class="row jumbotron heading">
<h1 style="text-align: center;">foo</h1>
<h3 style="text-align: center;">bar</h3>
</div>
<form method="post" id="services_form">
<div class="row">
<div class="four">
<div class="button">
<input type="checkbox" id="accomButton"></input>
<label class="buttonLabel" for="accomButton" id="accomLabel"></label>
</div>
</div>
<div class="four">
<div class="button">
<input type="checkbox" id="foodButton"></input>
<label class="buttonLabel" for="foodButton" id="foodLabel"></label>
</div>
</div>
<div class="four">
<div class="button">
<input type="checkbox" id="medicalButton"> </input>
<label class="buttonLabel" for="medicalButton" id="medicalLabel"></label>
</div>
</div>
</div>
</form>
</div>
Seems fine, although you don't need input closing tags (</input>). Here's a demo with placehold.it image:
body {
width: 100vw;
height: 100vh;
margin-left: auto;
margin-right: auto;
}
.container {
width: 100%;
height: 100%;
margin: 0;
}
.jumbotron {
width: 100%;
float: left;
}
.four {
width: 32vw;
float: left;
margin-left: 2%;
/*background-color: #95a5a6;*/
}
.row {
width: 100vw;
height: 20vh;
clear: both;
padding: 0px;
margin: 0px;
}
.buttonLabel {
cursor: pointer;
}
.button input[type="checkbox"] {
display: none;
}
.button input[type="checkbox"] + label {
width: 32vw;
height: 20vh;
display: inline-block;
}
#accomLabel {
background: url('http://placehold.it/54x54') no-repeat;
}
<div class="container">
<div class="row jumbotron heading">
<h1 style="text-align: center;">foo</h1>
<h3 style="text-align: center;">bar</h3>
</div>
<form method="post" id="services_form">
<div class="row">
<div class="four">
<div class="button">
<input type="checkbox" id="accomButton">
<label class="buttonLabel" for="accomButton" id="accomLabel"></label>
</div>
</div>
<div class="four">
<div class="button">
<input type="checkbox" id="foodButton">
<label class="buttonLabel" for="foodButton" id="foodLabel"></label>
</div>
</div>
<div class="four">
<div class="button">
<input type="checkbox" id="medicalButton">
<label class="buttonLabel" for="medicalButton" id="medicalLabel"></label>
</div>
</div>
</div>
</form>
</div>

bootstrap and ms edge bug?

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.