Why is there this huge margin in my webpage - html

I just made a for and I'm trying to put 2 divs next to each other in another div but there is this huge margin that won't let it happen I'm trying to figure it out but I can't get anything to work. please help me I have been trying to figure this out for hours. https://i.stack.imgur.com/JHAT1.png
just look at the /contact page/ in the CSS section that's the only code that I'm trying to fix. its only on the bottom.
#import url("https://fonts.googleapis.com/css?family=Poppins:400,500,600,700&display=swap");
* {
color: #ffffff;
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}
body {
background-color: #222;
}
nav {
display: flex;
height: 120px;
width: 100%;
background: #192841;
align-items: center;
justify-content: space-between;
padding: 0 50px 0 100px;
flex-wrap: wrap;
}
nav .logo {
color: #fff;
font-size: 30px;
font-weight: 600;
}
nav ul {
display: flex;
flex-wrap: wrap;
list-style: none;
}
nav ul li {
margin: 0 5px;
}
nav ul li a {
color: #f2f2f2;
text-decoration: none;
font-size: 16px;
font-weight: 500;
padding: 8px 14px;
border-radius: 5px;
letter-spacing: 1px;
transition: all 0.3s ease;
}
nav ul li a.active,
nav ul li a:hover {
color: #111;
background: #fff;
}
nav .menu-btn i {
color: #fff;
font-size: 22px;
cursor: pointer;
display: none;
}
input[type="checkbox"] {
display: none;
}
#media (max-width: 1000px) {
nav {
padding: 0 40px 0 50px;
}
}
#media (max-width: 920px) {
nav .menu-btn i {
display: block;
}
#click:checked ~ .menu-btn i:before {
content: "\f00d";
}
nav ul {
position: fixed;
top: 80px;
left: -100%;
background: #111;
height: 100vh;
width: 100%;
text-align: center;
display: block;
transition: all 0.3s ease;
}
#click:checked ~ ul {
left: 0;
}
nav ul li {
width: 100%;
margin: 40px 0;
}
nav ul li a {
width: 100%;
margin-left: -100%;
display: block;
font-size: 20px;
transition: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
#click:checked ~ ul li a {
margin-left: 0px;
}
nav ul li a.active,
nav ul li a:hover {
background: none;
color: cyan;
}
}
/* Footer */
.footer {
text-align: center;
display: inline-block;
bottom: 0;
width: 100%;
height: 50px;
padding-bottom: 1%;
}
.footer {
height: 100%;
}
/* Footer */
/*home page*/
.contentHeader {
text-align: center;
z-index: -1;
width: 100%;
padding-top: 2%;
color: #1b1b1b;
font-size: 30px;
font-weight: 400;
}
#media screen and (max-width: 768px) {
.contentHeader {
text-align: center;
z-index: -1;
width: 100%;
padding-top: 10px;
color: #1b1b1b;
padding: 2%;
padding-left: 5%;
padding-right: 5%;
}
}
.AboutOnHomepage {
padding: 5% 10%;
padding-top: 2%;
padding-bottom: 4%;
width: 100%;
text-align: justify;
align-items: center;
display: inline-block;
}
#media screen and (max-width: 768px) {
.AboutOnHomepage {
padding-top: 15%;
width: 100%;
text-align: justify;
height: 100px;
text-align: center;
}
.AboutOnHomepage p {
text-align: justify;
}
}
.AboutOnHomepage h2 {
white-space: nowrap;
}
.mainUpdate {
padding-left: 10%;
padding-right: 10%;
}
#media screen and (max-width: 768px) {
.mainUpdate {
width: 100%;
}
}
.recentUpdates {
padding-bottom: 3%;
text-align: center;
font-size: 20px;
}
#media screen and (max-width: 768px) {
.recentUpdates {
padding-top: 20%;
}
}
.up1Home {
text-align: center;
font-size: 18px;
font-weight: lighter;
}
.up2Home {
text-align: center;
padding-top: 3%;
font-size: 18px;
font-weight: lighter;
}
.up3Home {
text-align: center;
padding-top: 3%;
font-size: 18px;
font-weight: lighter;
}
.updateHome1 {
text-align: center;
width: 100%;
padding-bottom: 3%;
margin-top: 0%;
border-bottom: 1px solid white;
}
.par1 {
padding-top: 2%;
padding-left: 5%;
}
.img1 {
text-align: center;
padding-top: 2%;
width: 100px;
height: 100px;
}
#media screen and (max-width: 768px) {
.updateHome1 {
width: 100%;
margin-top: 2.5%;
margin-bottom: 20px;
}
.par1 {
margin-left: 10px;
}
.img1 {
margin-top: 12%;
margin-bottom: 10%;
width: 150px;
height: 100px;
}
}
.updateHome2 {
text-align: center;
padding-bottom: 3%;
margin-top: 0%;
border-bottom: 1px solid white;
}
.par2 {
text-align: center;
padding-top: 2%;
}
.img2 {
text-align: center;
margin-top: 2%;
width: 100px;
height: 100px;
}
#media screen and (max-width: 768px) {
.updateHome2 {
width: 100%;
margin-top: 2.5%;
margin-bottom: 20px;
}
.par2 {
margin-left: 10px;
}
.img2 {
margin-top: 12%;
margin-bottom: 10%;
width: 150px;
height: 100px;
}
}
.updateHome3 {
text-align: center;
padding-bottom: 10%;
margin-top: 0%;
}
.par3 {
padding-top: 2%;
float: left;
margin-left: 10px;
}
.img3 {
text-align: center;
margin-top: 2%;
width: 100px;
height: 100px;
}
#media screen and (max-width: 768px) {
.updateHome3 {
width: 100%;
margin-top: 2.5%;
margin-bottom: 20px;
}
.par3 {
margin-left: 10px;
}
.img3 {
margin-top: 12%;
margin-bottom: 10%;
width: 150px;
height: 100px;
}
}
/*home page*/
/*Google form*/
#media screen and (max-width: 768px) {
.content {
padding-bottom: 10%;
}
}
.googleFormHeading {
text-align: center;
z-index: -1;
width: 100%;
padding-top: 2%;
color: #1b1b1b;
font-size: 30px;
font-weight: 400;
}
#media screen and (max-width: 768px) {
.googleFormHeading {
text-align: center;
z-index: -1;
width: 100%;
padding-top: 2%;
color: #1b1b1b;
font-size: 30px;
font-weight: 400;
padding-left: 5%;
padding-right: 5%;
}
}
.bothGoogleForms {
padding-top: 3%;
display: inline-block;
text-align: center;
width: 100%;
}
.googleFormTv {
padding-left: 4%;
display: inline-block;
}
.googleFormTv iframe {
width: 700px;
height: 900px;
text-align: center;
display: inline-block;
}
.googleFormMovie {
padding-left: 3%;
display: inline-block;
margin-bottom: 10%;
}
.googleFormMovie iframe {
width: 700px;
height: 900px;
text-align: center;
display: inline-block;
}
#media screen and (max-width: 768px) {
.bothGoogleForms {
text-align: center;
width: 100%;
}
.googleFormTv {
text-align: center;
width: 90%;
padding-bottom: 11%;
border-bottom: 1px solid white;
}
.googleFormTv iframe {
width: 100%;
padding-left: 2%;
height: 976px;
}
.googleFormMovie {
text-align: center;
width: 100%;
padding-top: 11%;
margin-bottom: 15%;
}
.googleFormMovie iframe {
padding-left: 2%;
width: 90%;
height: 976px;
}
}
/*Google form*/
/*Contact Page*/
.ContactPageAll {
padding-left: 15px;
padding-right: 15px;
width: 100%;
display: inline-block;
}
.contactForm {
color: #111;
text-align: left;
width: 30%;
}
.contactForm input,
textarea,
label {
display: block;
color: #ffffff;
}
.contactForm input,
textarea,
button {
display: block;
padding: 4%;
width: 120%;
background-color: white;
color: #111;
}
.contactFormName {
padding-bottom: 2%;
font-size: 20px;
}
.socials {
width: 55%;
display: inline-block;
}
/*Contact Page*/ ;
<!DOCTYPE html>
<!-- Created By CodingNepal -->
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8" />
<title>Responsive Navigation Menu</title>
<link rel="stylesheet" href="../style.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<nav>
<div class="logo"> Reviews</div>
<input type="checkbox" id="click" />
<label for="click" class="menu-btn">
<i class="fas fa-bars"></i>
</label>
<ul>
<li>Home</li>
<li>Google Form</li>
<li>Movies</li>
<li>Tv-Shows</li>
<li>Top Movies</li>
<li>Top Tv-Shows</li>
<li><a class="active" href="contact.html">Contact</a></li>
</ul>
</nav>
<div class="ContactPageAll">
<div class="socials">fklghliabgljglabg</div>
<div class="contactForm">
<form action="https://formsubmit.co/myemail#aol.com" method="POST">
<label class="contactFormName" for="name">Name:</label>
<input
type="text"
name="name"
required
placeholder="Enter Your Name"
/>
<label class="contactFormEmail" for="Email">Email:</label>
<input
type="email"
name="email"
required
placeholder="Email Address"
/>
<label
class="contactForMessage"
for="message"
placeholder="Write Your Message here"
>What Do You Want to Say:</label
>
<textarea
name="message"
id="message"
placeholder="Write Your mEssage here"
cols="30"
rows="10"
></textarea>
<input
type="hidden"
name="_subject"
value="New submission From My website"
/>
<input
type="hidden"
name="_next"
value="https://sunnymoon25.github.io/mainPages/thanks.html"
/>
<input type="hidden" name="_captcha" value="false" />
<button type="submit">Send</button>
</form>
</div>
</div>
</body>
</html>
just look at the /contact page/ section that's the only code that I'm trying to fix

This is not margin this actual width as you have given
If you want to side by side div so you need to add below html and CSS so you get as you want output.
<div class="ContactPageAll">
<div class="socials">fklghliabgljglabg</div>
<div class="contactForm">
<form action="https://formsubmit.co/myemail#aol.com" method="POST">
<label class="contactFormName" for="name">Name:</label>
<input type="text" name="name" required="" placeholder="Enter Your Name">
<label class="contactFormEmail" for="Email">Email:</label>
<input type="email" name="email" required="" placeholder="Email Address">
<label class="contactForMessage" for="message" placeholder="Write Your Message here">What Do You Want to Say:</label>
<textarea name="message" id="message" placeholder="Write Your mEssage here" cols="30" rows="10"></textarea>
<input type="hidden" name="_subject" value="New submission From My website">
<input type="hidden" name="_next" value="https://sunnymoon25.github.io/mainPages/thanks.html">
<input type="hidden" name="_captcha" value="false">
<button type="submit">Send</button>
</form>
</div>
</div>
and put css below like
.ContactPageAll {
width: 100%;
display: flex;
flex-wrap: wrap;
}
.socials {
width: 50%;
}
.contactForm {
width: 50%;
}
.contactForm input, textarea, button {
display: block;
padding: 2%;
width: 100%;
background-color: white;
color: #111;
}
here I have taken 50:50 width, you can take any width and update it as you want

Related

How do I make my website display properly and get my navbar to display under the logo on smaller screens? Currently shows fine on desktops

So I'm still new to web developing and currently working on a restaurant site but when I view the page on smaller screens it's not displaying properly (not show full width) and the navbar is completely gone. How can I get this to properly show on smaller screens and the navbar to either become a togglebar or display under the logo? I think my current CSS setting might be to blame. Thanks
I have tried optimising with CSS and see if it can show the full page on smaller screens and have been able to achieve that for iPad Air and bigger screens but still no luck on smaller ones.
Happy to share my code if needed
HTML
<body>
<p class="catering">*Catering services available for hire</p>
<header>
<img class="shop-logo w-55" src="/FBS LOGO.png">
<nav class="navbar navbar-default">
<div class="hover-underline-animation"> Menu </div>
<div class="hover-underline-animation">Order</div>
<div class="hover-underline-animation">Location </div>
<div class="hover-underline-animation">Contact</div>
</nav>
</header>
<section class="about" id="about">
<div class="row">
<div class="image">
<img src="FBS_ISLAND GIRL_.png" alt="">
</div>
<div class="content">
<h3>
<span class="line-1"> "Authentic </span> <span class="line-2"> <br> Caribbean </span> <span class="line-3"><br> Cuisine" </span>
<span class="line-4"><br> jus lik momma use tah mek it </span>
</h3>
</div>
</div>
<p class="share"> Like, Follow `n Share <br> <i class="fa-brands fa-instagram"> </i> FOOD_BY_SOPHIE </i> </p>
</section>
<section class="order" id="order">
<h3 class="sub-heading">
Order Now
</h3>
<h1 class="heading">
Collection Only
</h1>
<form action="https://formsubmit.co/a5f5a32519da94e6ed9ceef9fd5cf8af" class="form-alert" method="POST">
<!- Honeypot -->
<input type="text" name="_honey" style="display: none;">
<!- Disaple Captcha -->
<input type="hidden" name="_captcha" value="false">
<input type="hidden" name="_next" value="https://sprightly-meerkat-b47b9e.netlify.app/">
<div class="inputBox">
<div class="input">
<span>
Your name
</span>
<input type="text" name="name" placeholder="Enter your name">
</div>
<div class="input">
<span>
Your number
</span>
<input type="number" name="number" placeholder="Enter your number">
</div>
</div>
<div class="inputBox">
<div class="input">
<span>
Your order
</span>
<input type="text" name="order" placeholder="Enter your order">
</div>
<div class="input">
<span>
Additional orders
</span>
<input type="text" name="extras" placeholder="Extras">
</div>
</div>
<div class="inputBox">
<div class="input">
<span>
How much
</span>
<input type="number" name="amount" placeholder="How many orders">
</div>
<div class="input">
<span>
Collection date & time
</span>
<input type="datetime-local" name="time">
</div>
</div>
<div class="inputBox">
<div class="input">
<span>
Your message
</span>
<textarea name="message" placeholder="Enter your message" id="" cols="30" rows="10"></textarea>
</div>
</div>
<input type="submit" value="Order now" class="btn btn-dark">
</form>
</section>
CSS
#import url('https://fonts.googleapis.com/css2?family=Libre+Bodoni:ital#1&family=Nunito:wght#200;300;400;600;700&display=swap');
:root{
--green:#27ae60;
--black:#192a56;
--light-color:#666;
--box-shadow:0 .5rem 1.5rem rgba(0,0,0,.1);
}
*{
margin: 0;
padding: 0;
box-sizing: border-box;
text-decoration: none;
outline: none;
border: none;
text-transform: capitalize;
transition: all .2s linear;
}
html {
font-size: 62%;
scroll-padding-top: 5.5rem;
scroll-behavior: smooth;
}
.loader-container {
position:fixed;
top: 0; left: 0;
height: 100%;
width: 100%;
z-index: 10000;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.loader-container img{
width: 35rem;
}
.loader-container.fade-out{
top: 110%;
opacity: 0;
}
header {
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #a8b98a;
display: flex;
align-items: center;
justify-content: center;
}
.hover-underline-animation {
display: inline-block;
position: relative;
color: white;
}
.hover-underline-animation::after {
content: '';
position: absolute;
width: 100%;
transform: scaleX(0);
height: 2px;
bottom: 0;
left: 0;
background-color: white;
transform-origin: bottom right;
transition: transform 0.25s ease-out;
}
.hover-underline-animation:hover::after {
transform: scaleX(1);
transform-origin: bottom left;
}
header .navbar a{
font-size: 40px;
border-radius: .5rem;
padding: .5rem 1.5rem;
color: white;
text-decoration: none;
font-family: 'Hi Melody', cursive;
}
.navbar a:hover {
font-size:88px;
font-size-adjust: 20px;
}
img.shop-logo {
width: 650px;
border-radius: 50%;
margin-bottom: -0px;
border: 10px;
margin-top: 0;
}
body {
background: #a8b98a;
}
.about .row{
display: flex;
flex-wrap: wrap;
gap: 1.5rem;
align-items: center;
}
.about {
background: #fbe7d7;
padding-right: 10px;
padding: 20rem 9% 40rem 0rem;
}
.about .row .image {
flex: 1 1 45rem;
position: absolute;
display: block;
}
.about .row .image img{
max-width: 1250px;
max-height: inherit;
height: inherit;
width: inherit;
padding-top: 100px;
}
.about .row .content {
flex: 1 1 45rem;
}
.about h3{
text-align: end;
}
.about .row .content p{
color: #aa401b;
font-size: 45px;
text-align: center;
font-family: 'Hi Melody', cursive;
font-weight: bolder;
}
.line-1 {
margin-right: 80px;
padding-left: 0px;
font-family: 'Hi Melody', cursive;
font-weight:bolder;
color: #d45a28;
font-size: 100px;
line-height: 0;
}
.line-2 {
margin-left: 5px;
padding-left: 150px;
font-family: 'Hi Melody', cursive;
font-weight:bolder;
color: #d45a28;font-family: 'Hi Melody', cursive;
font-size: 100px;
line-height: 1;
}
.line-3 {
margin-left: 5px;
padding-left: 100px;
font-family: 'Hi Melody', cursive;
font-weight:bolder;
color: #d45a28;
font-size: 100px;
line-height: 1;
}
.line-4{
margin-left: 5px;
padding-left: 100px;
font-family: 'Hi Melody', cursive;
font-weight:bolder;
color: #d45a28;
font-size: 40px;
line-height: 1;
}
.share {
color: #d45a28;
font-weight: bolder;
font-size: 20px;
float:right;
padding-top: 80px;
text-decoration: none;
font-family: 'Hi Melody', cursive;
padding-top: 250px;
}
.share a {
color: #d45a28;
text-decoration: none;
font-weight: bolder;
}
.sub-heading {
color: black;
text-align: center;
margin-top: 30px;
padding-top: 20px;
}
.heading {
color: black;
text-align: center;
}
.order form {
max-width: 90rem;
border-radius: .5rem;
box-shadow: var(--box-shadow);
border: .1rem solid rgba(0,0,0,.2);
background: #fff;
padding: 1.5rem;
margin: 0 auto;
}
.order form .inputBox {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.order form .inputBox .input {
width: 49%;
}
.order form .inputBox .input span{
display: block;
padding: .5rem 0;
font-size: 1.5rem;
color: var(--light-color);
}
.order form .inputBox .input input,
.order form .inputBox .input textarea{
background: #eee;
border-radius: .5rem;
padding: 1rem;
font-size: 1.6rem;
color: var(--black);
text-transform: none;
margin-bottom: 1rem;
width: 100%;
}
.order form .inputBox .input input:focus,
.order form .inputBox .input textarea:focus{
border: 1rem solid var(--green);
}
.order form .inputBox .input textarea{
height: 20rem;
resize: none;
}
.order form .btn {
margin-top: 0;
}
.order {
padding-bottom: 20px;
}
.footer .box-container{
display: grid;
grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
gap: 1.5rem;
text-align: center;
}
.footer .box-container .box{
padding: 5rem 0;
font-size: 2.5rem;
color: var(--black);
}
.footer .box-container a{
display: block;
padding: 5rem 0;
font-size: 1.5rem;
color: var(--light-color);
text-decoration: none;
}
.footer .box-container a:hover{
color: black;
text-decoration: none;
}
.footer .credit {
text-align: center;
border-top: .1rem solid rgba(0,0,0,.1);
font-size: 2rem;
color: var(--black);
padding: .5rem;
padding-top: 1.5rem;
margin-top: 1.5rem;
}
.footer .credit span {
color: black;
}
.footer {
background: #fbe7d7;
}
\\\\ Order CSS \\\\\
.order .sub-heading {
color: white;
}
.order .heading {
color: white;
}
.catering {
color: #d45a28;
text-align: right;
font-size: 20px;
padding-top: 40px;
padding-right: 10px;
font-weight: bold;
font-family: 'Times New Roman';
}
#media (max-width:991px){
html {
font-size: 55%;
}
header{
padding: 1rem 2rem;
}
section{
padding: 2rem;
}
}
#media (max-width:850px){
.about {
display: block;
text-align: center;
padding-bottom: 900px;
}
.content {
text-align: end;
}
.catering {
text-align: center;
}
p .share {
text-align: center;
}
.about .row .image img {
display: block;
position:absolute;
padding-top: 150px;
justify-content: center;
height: auto;
margin-right: 10px;
}
.share{
padding-left: 5000px;
}
}
#media (max-width:800px){
header .icon #menu-bars{
display: inline-block;
}
header .navbar {
position: absolute;
top: 100%; left: 0; right: 0;
background: #a8b98a;
border-top: .1rem solid rgba(0,0,0,.2);
border-bottom: .1rem solid rgba(0,0,0,.2);
padding: 1rem;
clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
}
header .navbar.active{
clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}
header .navbar a{
display: block;
padding: 1.5rem;
margin: 1rem;
font-size: 2rem;
background: #eee;
}
.image {
display: block;
text-align: center;
}
.about .row .image img{
height: auto;
width: 40%;
margin-left: 200px;
}
.home .home-slider .slide .content h3{
font-size: 5rem;
}
.about h3{
text-align:center;
font-size: 2rem;
}
}
#media (max-width:400px){
html {
font-size: 50%;
}
.dishes .box-container .box img {
height: auto;
width: 100%;
}
.order form .inputBox .input {
width: 100%;
}
.about {
display: block;
text-align: center;
}
.content {
text-align: end;
}
.catering {
text-align: center;
}
p .share {
text-align: center;
}
.about .row .image img {
display: block;
position:absolute;
padding: 200px 0 200px 0;
justify-content: center;
height: auto;
margin-right: 1000px;
}
}
Please check this https://www.w3schools.com/css/css3_mediaqueries.asp for learning CSS responsiveness and media queries.
Also check this one please: https://www.w3schools.com/css/css_rwd_mediaqueries.asp

Contact form wont let me type inside

I am attempting to create a contact form for my online store and I ran into a bug, when I try to type inside my text fields the website won't allow me to do so.
I have tried a couple of things but they were not much help. I have yet to add any JavaScript but I am not sure if that is the root of my problem or if it's something simple.
* {
margin: 0;
padding: 0;
font-family: 'poppins', sans-serif;
box-sizing: border-box;
}
.hero {
background: #1d2026;
min-height: 100vh;
width: 100%;
color: #fff;
position: relative;
}
nav {
display: flex;
align-items: center;
}
nav .menu {
width: 50px;
margin-right: 20px;
cursor: pointer;
padding-bottom: 50px;
}
nav .logo {
width: 500px;
height: 200px;
object-fit: none;
padding-right: 80px;
padding-bottom: 55px;
}
nav ul {
flex: 1;
text-align: right;
margin-right: 20px
}
nav ul li {
display: inline-block;
list-style: none;
margin-right: 20px;
padding-bottom: 100px;
font-size: 25px;
margin: 0 20px;
}
nav ul a {
text-decoration: none;
color: #fff;
}
.lamp-set {
position: absolute;
top: -20px;
left: 22%;
width: 200px;
}
.lamp {
width: 100%;
}
.light {
position: absolute;
top: 97%;
left: 50%;
transform: translateX(-50%);
width: 700px;
margin-left: -10px;
opacity: 1;
}
.text-container {
max-width: 1000px;
margin-top: 2%;
margin-left: 50%;
}
.text-container h1 {
font-size: 80px;
font-weight: 400;
display: inline-block;
color: #fff;
}
.text-container p {
font-size: 40px;
font-weight: 200;
display: inline-block;
color: #fff;
margin-top: 10px;
}
.emails {
background: #00a8f3;
padding: 14px 40px;
display: inline-block;
color: #fff;
font-size: 25px;
margin-top: 30px;
margin-left: 50%;
border-radius: 30px;
}
.villian {
background: #1d2026;
min-height: 100vh;
width: 100%;
color: #fff;
position: relative;
}
.text-contact {
max-width: 1000px;
margin-top: 2%;
margin-left: 50%;
}
.text-contact h1 {
font-size: 50px;
font-weight: 400;
display: inline-block;
color: #fff;
}
.text-shop h1 {
font-size: 80px;
font-weight: 400;
display: inline-block;
color: #fff;
margin-left: 50%;
}
.text-contact p {
font-size: 40px;
font-weight: 200;
display: inline-block;
color: #fff;
margin-top: 10px;
}
.container {
display: flex;
align-items: center;
justify-content: center;
}
form {
background: #fff;
display: flex;
flex-direction: column;
padding: 2vw 4vw;
width: 90%;
max-width: 600px;
border-radius: 10px;
}
form h3 {
color: #555;
font-weight: 800;
margin-bottom: 20px;
text-decoration: none;
}
form input,
form textarea {
border: 0;
margin: 10px 0;
padding: 20px;
outline: none;
background: #f5f5f5;
font-size: 16px;
}
form button {
padding: 15px;
background: #00a8f3;
color: #fff;
font-size: 18px;
border: 0;
outline: none;
cursor: pointer;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
<div class="hero">
<nav>
<img src="menu.png" class="menu">
<img src="ovlogo.png" class="logo">
<ul>
<li><a href="index.html">Home</li>
<li><a href="contact.html">contact</li>
</ul>
</nav>
<div class="container">
<form>
<h3>Get in touch</h3>
<input type="text" id="name" placeholder="Your name" required>
<input type="email" id="email" placeholder="Email" required>
<input type="text" id="phone" placeholder="Phone number" required>
<textarea id="message" rows="4" placeholder="How can we assist you?"></textarea>
<button type="submit">Submit</button>
</form>
</div>
</div>
You forgot to close your a tag so the whole page was a link which means if you click on anything contained in that link (virtually everything below the tag), it will reload the page
Fix is to add </a> to close it.
contact
* {
margin: 0;
padding: 0;
font-family: 'poppins', sans-serif;
box-sizing: border-box;
}
.hero {
background: #1d2026;
min-height: 100vh;
width: 100%;
color: #fff;
position: relative;
}
nav {
display: flex;
align-items: center;
}
nav .menu {
width: 50px;
margin-right: 20px;
cursor: pointer;
padding-bottom: 50px;
}
nav .logo {
width: 500px;
height: 200px;
object-fit: none;
padding-right: 80px;
padding-bottom: 55px;
}
nav ul {
flex: 1;
text-align: right;
margin-right: 20px
}
nav ul li {
display: inline-block;
list-style: none;
margin-right: 20px;
padding-bottom: 100px;
font-size: 25px;
margin: 0 20px;
}
nav ul a {
text-decoration: none;
color: #fff;
}
.lamp-set {
position: absolute;
top: -20px;
left: 22%;
width: 200px;
}
.lamp {
width: 100%;
}
.light {
position: absolute;
top: 97%;
left: 50%;
transform: translateX(-50%);
width: 700px;
margin-left: -10px;
opacity: 1;
}
.text-container {
max-width: 1000px;
margin-top: 2%;
margin-left: 50%;
}
.text-container h1 {
font-size: 80px;
font-weight: 400;
display: inline-block;
color: #fff;
}
.text-container p {
font-size: 40px;
font-weight: 200;
display: inline-block;
color: #fff;
margin-top: 10px;
}
.emails {
background: #00a8f3;
padding: 14px 40px;
display: inline-block;
color: #fff;
font-size: 25px;
margin-top: 30px;
margin-left: 50%;
border-radius: 30px;
}
.villian {
background: #1d2026;
min-height: 100vh;
width: 100%;
color: #fff;
position: relative;
}
.text-contact {
max-width: 1000px;
margin-top: 2%;
margin-left: 50%;
}
.text-contact h1 {
font-size: 50px;
font-weight: 400;
display: inline-block;
color: #fff;
}
.text-shop h1 {
font-size: 80px;
font-weight: 400;
display: inline-block;
color: #fff;
margin-left: 50%;
}
.text-contact p {
font-size: 40px;
font-weight: 200;
display: inline-block;
color: #fff;
margin-top: 10px;
}
.container {
display: flex;
align-items: center;
justify-content: center;
}
form {
background: #fff;
display: flex;
flex-direction: column;
padding: 2vw 4vw;
width: 90%;
max-width: 600px;
border-radius: 10px;
}
form h3 {
color: #555;
font-weight: 800;
margin-bottom: 20px;
text-decoration: none;
}
form input,
form textarea {
border: 0;
margin: 10px 0;
padding: 20px;
outline: none;
background: #f5f5f5;
font-size: 16px;
}
form button {
padding: 15px;
background: #00a8f3;
color: #fff;
font-size: 18px;
border: 0;
outline: none;
cursor: pointer;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
<div class="hero">
<nav>
<img src="menu.png" class="menu">
<img src="ovlogo.png" class="logo">
<ul>
<li><a href="index.html">Home</li>
<li>contact</li>
</ul>
</nav>
<div class="container">
<form>
<h3>Get in touch</h3>
<input type="text" id="name" placeholder="Your name" required>
<input type="email" id="email" placeholder="Email" required>
<input type="text" id="phone" placeholder="Phone number" required>
<textarea id="message" rows="4" placeholder="How can we assist you?"></textarea>
<button type="submit">Submit</button>
</form>
</div>
</div>

Form on web page?

I'm working on an assignment dealing with forms in HTML and CSS. I'm trying to follow the instructions but my form is coming out really wonky. Any suggestions on how I can fix this? I'd like to learn what I'm doing wrong.
body {
background-color: #B8DBED;
font-family: Arial;
}
header {
background-color: #000033;
color: #FFFFFF;
margin-left: auto;
margin-right: auto;
height: 120px;
padding-top: 30px;
padding-left: 3em;
text-align: center;
}
nav {
font-weight: bold;
padding: 1.5em;
font-size: 120%;
float: left;
width: 160px;
}
nav a {
text-decoration: none;
}
h1 {
margin-bottom: 0;
font-family: Georgia;
margin-top: 0;
font-size: 3em;
letter-spacing: 0.25em;
}
h2 {
color: #3399CC;
font-family: Georgia;
text-shadow: 1px 1px 1px #CCCCCC;
}
h3 {
font-family: Georgia;
color: #000033;
}
dt {
color: #000033;
}
.resort {
color: #5C7FA3;
font-weight: bold;
}
nav ul {
margin: 0;
padding-left: 0;
font-size: 1.2em;
list-style-type: none;
}
main ul {
list-style-image: url(marker.gif);
}
footer {
font-size: 75%;
font-style: italic;
text-align: center;
font-family: Georgia;
padding: 20px;
margin-left: 190px;
background: #FFFFFF;
}
#contact {
font-size: 90%;
}
#wrapper {
width: 80%;
margin-left: auto;
margin-right: auto;
max-width: 960px;
min-width: 204px;
background: #90C7E3;
box-shadow: 3px 3px 3px #333333;
border: 1px solid #000033;
background-image: linear-gradient(to bottom, #FFFFFF, #90C7E3);
}
main {
padding-top: 1px;
padding-right: 20px;
padding-bottom: 20px;
padding-left: 20px;
display: block;
background: #FFFFFF;
margin-left: 190px;
padding-left: 30px;
}
#homehero {
height: 300px;
background-image: url(coast2.jpg);
background-repeat: no-repeat;
background-size: 100% 100%;
margin-left: 190px;
}
#trailhero {
height: 300px;
background-image: url(trail.jpg);
background-repeat: no-repeat;
background-size: 100% 100%;
margin-left: 190px;
}
#yurthero {
height: 300px;
background-image: url(yurt.jpg);
background-repeat: no-repeat;
background-size: 100% 100%;
margin-left: 190px;
}
* {
box-sizing: border-box;
}
a:link {
color: #5C7FA3;
}
a:visited {
color: #344873;
}
a:hover {
color: #A52A2A;
}
header, main, nav, footer, figure, figcaption, aside, section, article {
display: block;
}
#mobile {
display: none;
}
#desktop {
display: inline;
}
#media only screen and (max-width: 64em) {
body {
background: #FFFFFF;
}
#wrapper {min-width: 0;
width: auto;
box-shadow: none;
border: none;
}
header {
padding-top: 0.5em;
padding-bottom: 0.5em;
padding-left: 0;
height: auto;
}
h1 {
letter-spacing: 0.1em;
}
main {
margin-left: 0;
}
nav {
float: none;
width: auto;
text-align: center;
padding: 0.5em;
}
nav li {
display: inline;
padding-top: 0.25em;
padding-bottom: 0.25em;
padding-left: 0.75em;
padding-right: 0.75em;
}
#homehero {
margin-left: 0;
height: 200px;
}
#yurthero{
margin-left: 0;
height: 200px;
}
#trailhero {
margin-left: 0;
height: 200px;
}
footer {
margin-left: 0;
}
}
#media only screen and (max-width: 37.5em) {
main {
padding-top: 0.1em;
padding-bottom: 0.1em;
padding-right: 1em;
padding-left: 1em;
font-size: 90%;
}
h1 {
font-size: 2em;
}
nav {
padding: 0;
}
nav li {
display: block;
margin: 0;
border-bottom: 2px solid #330000;
}
nav a {
display: block;
}
nav ul {
border: 2px solid #000000;
}
#homehero {
background-image: none;
height: 0;
}
#yurthero {
background-image: none;
height: 0;
}
#trailhero {
background-image: none;
height: 0;
}
#mobile {
display: inline;
}
#desktop {
display: none;
}
label {
float: none;
text-align: left;
}
input[type="submit"] {
margin-left: 0;
}
}
form {
float: left;
display: block;
width: 120px;
padding-right: 200px;
text-align: right;
}
input, textarea {
display: block;
margin-bottom: 20px;
}
button {
margin-left: 130px;
}
```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset= "utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<Title>Pacific Trails Resort :: Reservations</Title>
<link rel="stylesheet" href="pacific.css">
</head>
<body>
<div id="wrapper">
<header>
<h1> Pacific Trails Resort </h1>
<meta name="description" content="Pacific Trails Resort reservations page.">
</header>
<nav>
<ul>
<li>Home</li> <li>Yurts</li>
<li>Activities</li>
<li>Reservations</li>
</ul>
</nav>
<main>
<h2>Reservations at Pacific Trails</h2>
<h3>Contact Us Today!</h3>
<form name="reservations" method="post" action="http://webdevbasics.net/scripts/pacific.php">
<label for="myFName">First Name:</label>
<input type="text" name="myFName" id="myFName">
<label for="myLName">Last Name:</label>
<input type="text" name="myLName" id="myLName">
<label for="myEmail">Email:</label>
<input type="email" name="myEmail" id="myEmail" size="35">
<label for="myPhone">Phone Number:</label>
<input type="tel" name="myPhone" id="myPhone" maxlength="12">
<label for="myComments">Comments:</label>
<textarea name="myComments" id="myComments" rows="2" columns="30"></textarea>
<input type="submit" value="Submit">
</form>
<div id="contact">
<span class="resort">Pacific Trails Resort</span> <br>
12010 Pacific Trails Road <br>
Zephyr, CA 95555 <br>
<br>
<a id="mobile" href="tel:888-555-5555">888-555-5555</a> <br>
<span id="desktop">888-555-5555</span>
<br>
</div>
</main>
<footer>
Copyright © 2018 Pacific Trails Resort<br>
e.sween12#gmail.com
</footer>
</div>
</body>
</html>
I've attached some images of how it's supposed to look. Any suggestions would help. Thanks
As #JSKIM mentioned in the comments, you just need to remove float: left from your <form> elements styling. With float: left, the text or inline elements will wrap around it. After removing float, the content after the form will appear underneath (or next) like it appears in the normal flow.
When you use float on an element, it's removed from the normal flow of the page.
body {
background-color: #B8DBED;
font-family: Arial;
}
header {
background-color: #000033;
color: #FFFFFF;
margin-left: auto;
margin-right: auto;
height: 120px;
padding-top: 30px;
padding-left: 3em;
text-align: center;
}
nav {
font-weight: bold;
padding: 1.5em;
font-size: 120%;
float: left;
width: 160px;
}
nav a {
text-decoration: none;
}
h1 {
margin-bottom: 0;
font-family: Georgia;
margin-top: 0;
font-size: 3em;
letter-spacing: 0.25em;
}
h2 {
color: #3399CC;
font-family: Georgia;
text-shadow: 1px 1px 1px #CCCCCC;
}
h3 {
font-family: Georgia;
color: #000033;
}
dt {
color: #000033;
}
.resort {
color: #5C7FA3;
font-weight: bold;
}
nav ul {
margin: 0;
padding-left: 0;
font-size: 1.2em;
list-style-type: none;
}
main ul {
list-style-image: url(marker.gif);
}
footer {
font-size: 75%;
font-style: italic;
text-align: center;
font-family: Georgia;
padding: 20px;
margin-left: 190px;
background: #FFFFFF;
}
#contact {
font-size: 90%;
}
#wrapper {
width: 80%;
margin-left: auto;
margin-right: auto;
max-width: 960px;
min-width: 204px;
background: #90C7E3;
box-shadow: 3px 3px 3px #333333;
border: 1px solid #000033;
background-image: linear-gradient(to bottom, #FFFFFF, #90C7E3);
}
main {
padding-top: 1px;
padding-right: 20px;
padding-bottom: 20px;
padding-left: 20px;
display: block;
background: #FFFFFF;
margin-left: 190px;
padding-left: 30px;
}
#homehero {
height: 300px;
background-image: url(coast2.jpg);
background-repeat: no-repeat;
background-size: 100% 100%;
margin-left: 190px;
}
#trailhero {
height: 300px;
background-image: url(trail.jpg);
background-repeat: no-repeat;
background-size: 100% 100%;
margin-left: 190px;
}
#yurthero {
height: 300px;
background-image: url(yurt.jpg);
background-repeat: no-repeat;
background-size: 100% 100%;
margin-left: 190px;
}
* {
box-sizing: border-box;
}
a:link {
color: #5C7FA3;
}
a:visited {
color: #344873;
}
a:hover {
color: #A52A2A;
}
header, main, nav, footer, figure, figcaption, aside, section, article {
display: block;
}
#mobile {
display: none;
}
#desktop {
display: inline;
}
#media only screen and (max-width: 64em) {
body {
background: #FFFFFF;
}
#wrapper {min-width: 0;
width: auto;
box-shadow: none;
border: none;
}
header {
padding-top: 0.5em;
padding-bottom: 0.5em;
padding-left: 0;
height: auto;
}
h1 {
letter-spacing: 0.1em;
}
main {
margin-left: 0;
}
nav {
float: none;
width: auto;
text-align: center;
padding: 0.5em;
}
nav li {
display: inline;
padding-top: 0.25em;
padding-bottom: 0.25em;
padding-left: 0.75em;
padding-right: 0.75em;
}
#homehero {
margin-left: 0;
height: 200px;
}
#yurthero{
margin-left: 0;
height: 200px;
}
#trailhero {
margin-left: 0;
height: 200px;
}
footer {
margin-left: 0;
}
}
#media only screen and (max-width: 37.5em) {
main {
padding-top: 0.1em;
padding-bottom: 0.1em;
padding-right: 1em;
padding-left: 1em;
font-size: 90%;
}
h1 {
font-size: 2em;
}
nav {
padding: 0;
}
nav li {
display: block;
margin: 0;
border-bottom: 2px solid #330000;
}
nav a {
display: block;
}
nav ul {
border: 2px solid #000000;
}
#homehero {
background-image: none;
height: 0;
}
#yurthero {
background-image: none;
height: 0;
}
#trailhero {
background-image: none;
height: 0;
}
#mobile {
display: inline;
}
#desktop {
display: none;
}
label {
float: none;
text-align: left;
}
/*
input[type="submit"] {
margin-left: 0;
}*/
}
form {
margin: 1.5rem 0;
}
form label {
display: inline-block;
text-align: right;
width: 120px;
}
form div {
display: flex;
align-items: center;
justify-content: flex-start;
margin: 1rem 0;
}
form input:not(input[class="submit"]), form textarea {
margin-left: .75rem;
}
form textarea {
resize: vertical;
width: 30ch;
max-width: 40ch;
}
.submit {
margin-left: 130px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset= "utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<Title>Pacific Trails Resort :: Reservations</Title>
<link rel="stylesheet" href="pacific.css">
</head>
<body>
<div id="wrapper">
<header>
<h1> Pacific Trails Resort </h1>
<meta name="description" content="Pacific Trails Resort reservations page.">
</header>
<nav>
<ul>
<li>Home</li> <li>Yurts</li>
<li>Activities</li>
<li>Reservations</li>
</ul>
</nav>
<main>
<h2>Reservations at Pacific Trails</h2>
<h3>Contact Us Today!</h3>
<form name="reservations" method="post" action="http://webdevbasics.net/scripts/pacific.php">
<div>
<label for="myFName">First Name:</label>
<input type="text" name="myFName" id="myFName">
</div>
<div>
<label for="myLName">Last Name:</label>
<input type="text" name="myLName" id="myLName">
</div>
<div>
<label for="myEmail">Email:</label>
<input type="email" name="myEmail" id="myEmail" size="30">
</div>
<div>
<label for="myPhone">Phone:</label>
<input type="tel" name="myPhone" id="myPhone" maxlength="12">
</div>
<div>
<label for="myComments">Comments:</label>
<textarea name="myComments" id="myComments" rows="2" columns="30"></textarea>
</div>
<input class="submit" type="submit" value="Submit">
</form>
<div id="contact">
<span class="resort">Pacific Trails Resort</span> <br>
12010 Pacific Trails Road <br>
Zephyr, CA 95555 <br>
<br>
<a id="mobile" href="tel:888-555-5555">888-555-5555</a> <br>
<span id="desktop">888-555-5555</span>
<br>
</div>
</main>
<footer>
Copyright © 2018 Pacific Trails Resort<br>
e.sween12#gmail.com
</footer>
</div>
</body>
</html>

checkbox does not align inside div tag

Good day, somehow my check box and the text that needs to be beside it do not align in the same row. I have the code on JS Fiddle.
https://jsfiddle.net/6ejwdg9v/
The checkbox code is:
<div class="form-group">
<div class="checkbox">
<label>
<input type="checkbox" name="agree" value="agree" /> Agree with the terms and conditions
</label>
</div>
</div>
the classes form-group and checkbox are not touched with custom css code which is why I wonder how are they affected.
EDIT: I added the code in the "duplicate of another question" it did not do anything I still need help
changed class for .checkbox added
vertical-align: middle;
width: 20px;
also added
input[type=checkbox] {
width: 20px;
}
#font-face {
font-family: 'brandon_reg';
src: url('../fonts/brandon-grotesque-light.otf');
}
#font-face {
font-family: 'brandon_med';
src: url('../fonts/brandon-grotesque-medium.otf');
}
#font-face {
font-family: 'brandon_black';
src: url('../fonts/brandon-grotesque-black.otf');
}
html {
font-size: 100%;
}
body {
margin: 0 auto;
display: block;
/*REGISTER BACKGROUND*/
background-position: center;
background-repeat: no-repeat;
background-size: cover;
/*REGISTER BACKGROUND*/
}
.regular_bg {
font-family: 'brandon_reg';
}
.med_bg {
font-family: 'brandon_med';
}
.sml_padding {
margin: -10;
padding: -10;
}
.thick_bg {
font-family: 'brandon_black';
}
.thick_bg2 {
font-size: 35px;
}
#media only screen and (max-width : 767px) {
.box {
height: auto !important;
}
}
.fadeIn {
-webkit-animation: animat_show 0.8s;
animation: animat_show 0.8s;
visibility: visible !important;
}
#-webkit-keyframes animat_show{
0%{opacity:0}
100%{opacity:1}
}
.btn-group-sm>.btn, .btn-sm {
float: none;
}
.navbar-toggle {
display: inline-block;
float: none;
}
.full_width {
height: auto;
width:100%;
}
.ul_login {
color: #00a6a6;
}
.ul_reg {
color: #f08300;
}
.justify_text {
transform: translateT(-50);
text-align: justify;
padding: 2%;
display: flex;
justify-content: center;
align-items: center;
}
/*
.row_center {
display: flex;
}
.row_center>* {
flex: 1;
}
*/
.center-block {
margin-left:auto;
margin-right:auto;
display:block;
}
.icon_text_padding {
padding-bottom: 20px;
align-items: center;
margin: 0 auto;
}
.fab {
padding: 20px;
font-size: 50px;
color: #FFF;
}
.fab:hover {
color: #c9c9c9;
text-decoration: none;
}
/*IMPORTANT CSS FOR HEADER*/
.nav {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100px;
padding: 10px 100px;
box-sizing: border-box;
transition: .5s;
}
.list1 {
float: left;
font-size: 200%;
}
.list2 {
float: right;
font-size: 200%;
}
.list2 li a:hover {
color: #fff;
}
/*
.lines {
position: relative;
padding: 10px 0;
}
.lines:before {
content: '';
display: block;
margin-left: auto;
margin-right: auto;
margin-bottom: 10px;
top: 0;
left: 0;
width: 32%;
height: 1px;
background: #cfcfcf;
}
.lines:after {
content: '';
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
bottom: 0;
left: 0;
width: 32%;
height: 1px;
background: #cfcfcf;
}
.lines_med:before {
width: 24%;
}
.lines_med:after {
width: 24%;
}
.lines_med2:before {
width: 27%;
}
.lines_med2:after {
width: 27%;
}
.lines_long:before {
width: 38%;
}
.lines_long:after {
width: 38%;
}
*/
nav .logo {
float: left;
}
nav .logo img {
height: 80px;
transition: 5s;
}
nav ul {
float: left;
margin: 0;
padding: 0;
display: flex;
}
nav ul li {
list-style: none;
}
nav ul li a {
line-height: 80px;
color: #262626;
padding: 5px 20px;
text-decoration: none;
transition: .5s;
}
nav ul li a:hover {
color: #fff;
background: #00a6a6;
text-decoration: none;
}
footer {
width: 100%;
background-color: #00a6a6;
padding: 3%;
color: #FFF;
}
.carousel-control.left, .carousel-control.right {
background-image:none !important;
filter:none !important;
}
.container-fluid {
max-width: 1200px;
}
footer .container-fluid {
max-width: 100%;
}
.footer_links a h4 {
color: #fff;
}
.footer_links a:hover {
color: #fff;
text-decoration: underline;
}
.faq a:hover {
text-decoration: none !important;
}
.info_container {
max-width: 1920px;
width: 100%;
margin: 0 auto;
}
.info_box h2 {
text-align: center;
}
.info_header {
padding-top: 4%;
padding-bottom: 4%;
}
.bottom_padding {
padding-bottom: 4%;
}
.info_font {
font-size: 18px;
}
.mv_font {
font-size: 20px;
text-align: left;
}
.contact_font {
font-size: 20px;
text-align: center;
}
.center_font {
margin: 0 auto;
text-align: center;
}
#icon {
max-width: 90%;
}
#media (max-width: 600px){
#icon {
max-width: 150px;
}
h4 {
font-size: 1.7em;
}
}
/*CONTACT PAGE*/
.text_field_design {
padding: 50px 0 80px;
text-align: center;
}
.text_field_design p {
padding-bottom: 80px;
color: #737373;
}
.text_field_design h2 {
color: #4c4c4c;
margin: 20px 0 20px;
}
.text_field_design .input-group {
margin-bottom: 25px;
}
.input-group-addon {
padding: -50px !important;
font-size: 20px;
}
.text_field_design .form-control {
border-radius: 0 !important;
}
.text_field_design span {
border-radius: 0 !important;
}
.text_field_design .btn {
border-radius: 0;
width: 100%;
font-size: 15px;
background-color: #f08300;
color: #fff;
}
.text_field_design .btn:hover {
background-color: #f3a64c;
color: #fff !important;
}
.box_shadow {
box-shadow: 10px 10px 5px grey;
}
.curved_img {
border-radius: 10px;
}
/*REGISTER*/
.reg_box {
width: 90%;
padding: 70px 70px 10px;
background: #fff;
top: 50%;
left: 50%;
margin: 0 auto;
opacity: 0.9;
border-radius: 30px;
}
.reg_box p {
margin: 0;
padding: 0;
font-weight: bold;
}
.reg_box input {
width: 100%;
margin-bottom: 20px;
}
.reg_box input[type="text"], input[type="password"] {
border: none;
border-bottom: 1px solid #000;
background: transparent;
outline: none;
height: 40px;
}
.reg_box input[class="reg_signup"] {
font-family: 'brandon_med';
border: none;
outline: none;
height: 40px;
background: #f08300;
color: #fff;
font-size: 18px;
margin-top: 20px;
}
.reg_box input[class="reg_fb"] {
font-family: 'brandon_med';
border: none;
outline: none;
height: 40px;
background: #3b579d;
color: #fff;
font-size: 18px;
}
.reg_box input[class="reg_google"] {
font-family: 'brandon_med';
border: none;
outline: none;
height: 40px;
background: #2eaa52;
color: #fff;
font-size: 18px;
}
.checkbox {
float: left !important;
display: block;
margin-top: 10px;
margin-bottom: 10px;
width: 100%;
vertical-align:middle;
}
/*
.register_form {
text-align: center;
margin: 100px 400px;
}
.registration {
width: 100%;
background-color: #fff;
opacity: 0.9;
padding: 50px 0px;
}
.align_left_reg {
text-align: left;
font-size: 18px;
}
#text_field {
width: 250px;
border-radius: 5px;
padding: 5px;
}
#phone {
width: 250px;
padding: 5px;
border-radius: 5px;
outline: 0px;
}
#rd {
font-family: 'brandon_med';
}
.button_container {
max-width: 60%;
}
.ref_button {
width: 100px;
height: 40px;
font-size: 18px;
background-color: #f08300;
color: #fff;
}
.fb_button {
width: 200px;
height: 40px;
font-size: 18px;
background-color: #3b579d;
color: #fff;
}
.fb_button:hover {
background-color: #3662d0;
}
.ref_button:hover {
background-color: #f3a64c;
color: #fff !important;
}
element.style {
color: white;
}
REGISTER*/
input[type=checkbox] {
width: 20px;
}
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My White Card</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body style="background-color:#000;" class="regular_bg">
<br><br>
<div class="reg_box">
<div class="row">
<div class="col-md-6">
<input type="submit" value="Sign Up With Facebook" class="reg_fb"></i>
</div>
<div class="col-md-6">
<input type="submit" value="Sign Up With Google" class="reg_google"></i>
</div>
</div>
<br>
<form>
<div class="row">
<div class="col-md-6 col-sm-12">
<p>First Name</p>
<input type="text" placeholder="First Name">
<p>Email</p>
<input type="text" placeholder="Email">
<p>Password</p>
<input type="password" placeholder="Password">
</div>
<div class="col-md-6 col-sm-12">
<p>Last Name</p>
<input type="text" placeholder="Last Name">
<p>Number</p>
<input type="text" placeholder="Number">
<p>Retype Password</p>
<input type="password" placeholder="Retype Password">
</div>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<input type="checkbox" name="agree" value="agree" /> Agree with the terms and conditions
</label>
</div>
</div>
<input type="submit" value="Sign Up" class="reg_signup">
</div>
</form>
</div>
</body>
</html>
Turning the label into a flexbox will give you vertical alignment.
.checkbox label {
display: flex;
align-items: center; /* Vertical alignment */
}
<div class="form-group">
<div class="checkbox">
<label>
<input type="checkbox" name="agree" value="agree" /> Agree with the terms and conditions
</label>
</div>
</div>

Mobile view of the contact page bug

just such a problem – my contact page has a view bug when in the mobile view – the footer is aroused almost all over the screen and the contact form is on itsee screenshot, I marked the div that obviously causes problems . Checked all the HTML tags – they're OK, tried position of the objects in the CSS – nothing helps. In the desktop view everything looks OKsee screenshot. Here is the HTML document and a CSS file linked there. They are better to copy to an editor to run in a browser.
a {
color: #f91111;
}
a:hover {
color: #fff;
background: #f91111;
text-decoration: none;
}
body {
margin: 0;
padding: 0;
font-size: 97%;
line-height: 1.4em;
min-width: 500px;
font-family: Helvetica;
letter-spacing: 101%;
min-height: 100%;
}
header {
margin-bottom: 1%;
background-image: url(../images/DSC00075.JPG);
background-position: 0% 7%;
background-size: 100%;
background-opacity: 0.9;
background-color: #f91111;
padding: 1% 0 0%;
position: fixed;
z-index: 10;
width: 100%;
}
.header {
max-width: 1310px;
margin: 0 auto;
}
.collapse {
display: none;
}
.panel-group .panel-heading+.panel-collapse>.panel-body,
.panel-group .panel-heading+.panel-collapse>.list-group {
border-top: 1px solid #ddd;
}
main {
margin: 0 auto;
/* padding: 10% 15% 2.9%; */
font-size: 94%;
max-width: 1310px;
padding-top: 200px !important;
min-height: calc(74.75vh);
}
nav {
max-width: 750px;
text-align: left;
padding-bottom: 0.85em;
padding-left: 0.35em;
}
nav a {
display: inline;
text-align: left;
text-decoration: none;
padding: 2%;
margin-right: 4.8%;
border-radius: 5px;
color: #fff;
line-height: 1em;
}
nav a:hover {
background-color: #fff;
color: #000;
}
a.active {
background-color: #fff;
color: #000;
}
.footer {
font-size: 0.75rem;
padding: 1.5% 15% 1.25% 14.4%;
color: #fff;
}
h1 {
font-size: 4rem;
padding-bottom: 1rem;
padding-left: 0.8%;
color: #fff;
}
h2 {
font-size: 2.5em;
color: #f91111;
margin-bottom: 2.5rem;
line-height: 1.25em;
}
h3 {
font-size: 1.3em;
color: #f91111;
padding: 0.25% 0%;
}
h3.lebenslauf {
background: #f91111;
color: #fff;
padding: 0.25% 0% 0.25% 1%;
}
.hr4 .lightborder {
display: block;
width: 93%;
border-bottom: 1px solid #e8e8e8;
position: relative;
z-index: 1;
}
span.ul-second-line {
/*padding-left: 10px;*/
margin-left: 7px;
}
ul.Lebenslauf {
padding-left: 16px;
margin-top: 0px;
}
p.no-margin-before {
-webkit-margin-before: 0;
}
div.button {
display: inline;
font-size: 0.75rem;
padding: 5px;
margin-right: 10px;
min-width: 15%;
}
div.table-row {
max-width: 100%;
display: block;
margin-bottom: 0.75rem;
padding-left: 1px;
font-size: 0.95em;
}
div.left {
float: left;
width: 20%;
min-width: 150px;
display: inline;
}
div.right {
width: 75%;
display: inline-block;
}
.empty-bottom {
height: auto;
}
a.up-there {
text-decoration: none;
padding: 3px 5px;
}
div.kategorie a.up-there {
margin-right: -9px;
}
div.kategorie a.up-there:hover {
margin-right: 0px;
}
.collapse {
display: none;
}
strong.red-accentuation {
color: #f91111;
}
footer {
max-width: 100%;
background-color: #f91111;
padding: 0 2%;
vertical-align: bottom;
}
footer a {
color: white;
text-decoration: none;
margin-bottom: 0;
}
footer a:hover {
text-decoration: underline;
}
#image {
text-align: center;
width: auto;
border: none;
margin: 0 auto;
margin-bottom: 10px;
background-color: none;
font-size: 100%;
background-image: url('');
}
.empty-space {
text-align: right;
}
#image-alternative {
text-align: center;
margin: 0 auto;
margin-bottom: 10px;
}
.preview {
width: 10%;
margin-left: 10px;
border: 3px solid #f91111;
border-radius: 5px;
height: 15%;
}
.container {
max-width: 95%;
margin: 3% auto;
margin-left: 0;
padding: 10px;
padding-left: 0;
background-color: none;
overflow: hidden;
box-shadow: none;
}
.gallery ul {
list-style: none;
padding: 0;
margin: 0 auto;
}
.gallery li {
display: inline;
width: 50%;
height: 30vh;
margin: 2%;
margin-left: 0;
position: relative;
font-size: 0;
}
.modal-open .modal {
overflow-x: hidden;
overflow-y: auto;
}
.modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1050;
display: none;
overflow: hidden;
-webkit-overflow-scrolling: touch;
outline: 0;
}
.fade.in {
opacity: 1;
}
.fade {
opacity: 0;
-webkit-transition: opacity .15s linear;
-o-transition: opacity .15s linear;
transition: opacity .15s linear;
}
.referenz-link {
border: solid 1px #f91111;
border-radius: 10px;
width: 200px;
height: 200px;
margin-right: 30px;
margin-bottom: 30px;
overflow: hidden;
display: inline-block;
background: #f91111;
}
.referenz-link:last-child {
margin-right: 0px;
}
.referenz-link:hover {
background: none;
}
.picture-keeper {
overflow: hidden;
height: 133px;
margin-bottom: 10px;
border-bottom: solid 1px #f91111;
background: #fff;
}
img.reference {
width: 100%;
}
.notation {
padding: 0px 10px 15px;
text-align: center;
}
.referenz-link a {
color: #fff;
text-decoration: none;
font-weight: 700;
}
.referenz-link a:hover {
color: #f91111;
background: #fff;
}
h1.header {
display: inline-block;
}
img.presentation {
display: block;
margin-left: -1em;
}
h2.with-picture {
display: inline-block;
}
.foto-presentation {
text-align: center;
margin-bottom: 2.5em;
}
.adress-left {
display: inline-block;
float: left;
width: 48%;
margin-right: 2%;
}
.form-right {
display: inline-block;
width: 48%;
float: right;
}
dd,
dt {
display: inline-block;
}
dd {
margin-left: 0;
}
dt {
width: 7em;
}
dl {
-webkit-margin-before: 0;
-webkit-margin-after: 0;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
}
address {
font-style: normal;
}
label.kontaktangabe {
width: 8em;
display: inline-block;
}
textarea,
input[type="text"] {
border: solid 1px #f91111;
border-radius: 3px;
padding: 4px;
line-height: 1.5em !important;
}
textarea {
font: 400 0.95em Arial;
}
div#nachricht label {
vertical-align: top;
}
button.buttons {
color: #fff;
background: #f91111;
border: none;
border-radius: 3px;
font-size: 14px;
padding: 7px;
}
button.buttons:hover {
background: #a60c0c;
}
#kontaktdaten div.table-row {
font-size: 1em;
}
#kontaktdaten form {
padding-top: 1em;
}
#media screen and (min-width: 500px) and (max-width: 790px) {
header {
background-position: 0% 10%;
background-size: 100%;
padding: 1% 1% 1%;
margin: 0;
}
h1 {
font-size: 3rem;
}
nav a {
padding: 1.5%;
margin-right: 1%;
border-radius: 2px;
}
nav {
align: left;
padding-bottom: 0.1rem;
}
main {
margin: 0% 1%;
padding: 1%;
}
div.left {
margin-right: 1rem;
min-width: none;
}
.referenz-link {
width: 200px;
height: 200px;
margin-right: 45px;
margin-bottom: 45px;
}
.referenz-link:last-child {
margin-right: 0px;
}
.picture-keeper {
height: 133px;
}
.notation {
font-size: 1em;
}
.adress-left {
display: block;
width: 95%;
margin-bottom: 2em;
}
.form-right {
display: block;
width: 95%;
float: left;
}
label.kontaktangabe {
display: block;
}
}
#media screen and (max-width: 480px) {
body {
max-width: 450px;
font-size: 0.9rem;
padding: 0%;
}
header {
padding: 0% 1% 1%;
margin: 0;
background-position: 0% 0%;
background-repeat: no-repeat;
background-size: cover;
}
h1 {
font-size: 2rem;
}
nav {
max-width: 480px;
align: left;
padding-bottom: 0.6em;
}
nav a {
display: block;
text-align: left;
text-decoration: none;
padding: 1.5%;
margin: 0.5% 0%;
border-radius: 2px;
max-width: 30%;
}
main {
margin: 0% 0% 0% 1;
padding: 1% 0% 1% 1%;
max-width: 450px;
font-size: 100%;
}
div.left {
width: 100%;
float: none;
display: block;
min-width: 0;
}
div.right {
max-width: 100%;
display: block;
}
.hr4 .lightborder {
display: block;
max-width: 100%;
}
div.button {
display: block;
max-width: 50%;
text-align: center;
margin: 0 auto;
}
footer {
max-width: 480px !important;
}
.container {
padding: 0%;
}
img.preview {
margin-left: 0%;
margin-right: 2%;
}
.footer {
padding: 1.5% 0%;
max-width: 450px;
}
.referenz-link {
margin-right: 45px;
margin-bottom: 45px;
}
.notation {
font-size: 1.25em;
}
.adress-left {
display: block;
width: 95%;
margin-bottom: 2em;
}
.form-right {
display: block;
width: 95%;
float: left;
}
label.kontaktangabe {
display: block;
}
textarea.contact-form {
width: 379px;
}
dd,
dt {
display: block;
}
dd {
margin-bottom: 1em;
}
span.left {
font-weight: 700;
}
.kategorie .table-row {
margin-bottom: 2rem;
}
div#werdegang .table-row {
margin-bottom: 1em;
}
}
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Peter Schachnowskij – Homepage</title>
<link rel="stylesheet" href="css/portfolio.css">
</head>
<body>
<header>
<div class="header">
<h1>Peter Schachnowskij</h1>
<nav>
Startseite
Lebenslauf
Referenzen
Zeugnisse
<a class="active">Kontakt</a>
</nav>
</div>
</header>
<main>
<p> </p>
<h2>Kontakt</h2>
<div class="table-row" id="kontaktdaten">
<div class="adress-left">
<h3>Peter Schachnowskij</h3>
<p><address>Richterstraße 9<br>
70567 Stuttgart</address></p>
<p>
<dl><dt>Tel.:</dt>
<dd>01 76 / 21 75 17 11</dd>
</dl>
<dt>E-Mail: </dt>
<dd>peter.schachnowskij.gf#gmail.com</dd>
<p>
<p>
<dl><dt>Homepage:</dt>
<dd>noch im Aufbau</dd>
</dl>
<dl><dt>XING-Profil:</dt>
<dd>https://www.xing.com/profile/Peter_Schachnowskij</dd>
</dl>
</p>
</div>
<div class="form-right">
<h3>Haben Sie ein Anliegen?</h3>
<p>Schreiben Sie mir gerne!</p>
<form action="mailto:peter.schachnowskij.gf#gmail.com" method="post">
<div class="table-row"><label class="kontaktangabe" for="name">Ihr Name*: </label><input type="text" value size="50" aria-required="true" aria-invalid="false" /></div>
<div class="table-row"><label class="kontaktangabe" for="vorname">Ihr Vorname*: </label><input type="text" value size="50" aria-required="true" aria-invalid="false" /></div>
<div class="table-row"><label class="kontaktangabe" for="e-mail">Ihre E-Mail*: </label><input type="text" value size="50" aria-required="true" aria-invalid="false" /></div>
<div class="table-row"><label class="kontaktangabe" for="telefon">Ihr Telefon: </label><input type="text" value size="50" aria-required="false" aria-invalid="false" /></div>
<div class="table-row" id="nachricht"><label class="kontaktangabe" for="nachricht">Ihre Nachricht: </label><textarea name="your-message" cols="52" rows="12" class="contact-form" aria-invalid="false"></textarea></div>
<div class="table-row"><label class="kontaktangabe" for="absenden"> </label><button class="buttons" type="submit" name="action" id="absenden">Absenden</button></div>
</form>
<div class="empty-bottom"> </div>
</div>
</div>
</main>
<div class="empty-bottom"> </div>
<footer>
<div class="footer">
<div class="button">Peter Schachnowskij </div>
<div class="button">Richterstr. 9 </div>
<div class="button">70567 Stuttgart </div>
<div class="button">
<nobr>Tel.: 01 76 / 21 75 17 11</nobr>
</div>
<div class="button">
<nobr>E-Mail: peter.schachnowskij.gf#gmail.com</nobr>
</div>
</div>
</footer>
</body>
</html>
Can someone please help me? Thanx in previous.