footer displays somewhere midpage - html

I accidentally put my footer in my main tag (but my page displayed correctly) and saw this so I corrected it. But when I did that my footer displayed somewhere in the mid between my header and my main... It's a really important project for school and tomorrow is the deadline if anyone could help me with this because I have been looking for hours and can't seem to find what I did wrong and it's driving me crazy! Any help is so so appreciated!
This is the link to the site
html{
box-sizing: border-box;
font-size: 62.5%;
font-family: 'Fira Sans';
}
*, *:before, *:after{
box-sizing: inherit;
}
#font-face {
font-family: 'Fira Sans';
src: url(../assets/fonts/FiraSans-Regular.otf) format('opentype');
}
#font-face {
font-family: 'Fira Sans Light';
src: url(../assets/fonts/FiraSans-Light.otf) format('opentype');
}
#font-face {
font-family: 'Fira Sans Heavy';
src: url(../assets/fonts/FiraSans-Heavy.otf) format('opentype');
}
#font-face {
font-family: 'Fira Sans Extra Bold';
src: url(../assets/fonts/FiraSans-ExtraBold.otf) format('opentype');
}
#font-face {
font-family: 'Moon';
src: url(../assets/fonts/Moon-Light.otf) format('opentype');
}
.bg-header{
background-image: url(../assets/img/paintdrop-test-01-01.svg);
height: 77.5rem;
width: 128.6rem;;
background-repeat: no-repeat;
background-position: top ;
margin: 0 auto;
}
.container-header{
width: 96rem;
margin: 0 auto;
display: flex;
flex-direction: column;
}
nav{
display: flex;
justify-content: center;
padding: 4rem 0rem;
}
nav ul{
display: flex;
justify-content: space-between;
width: 50%;
}
nav ul li{
list-style: none;
display: inline;
}
a{
text-decoration: none;
color: black;
text-transform: uppercase;
font-family: 'Fira Sans';
letter-spacing: .2rem;
font-size: 1.5rem;
display: block;
padding: 1rem 2rem;
}
.link:hover /*, a:not([class="button-wit"])*/{
color: white;
border-radius:1.5rem;
background: linear-gradient(to left, #363795, #005c97);
transition: all .2s ease-in-out;
}
.title{
display: flex;
background-image: url(../assets/img/blue-monday-title.svg);
background-repeat: no-repeat;
background-position: center center;
width: 100%;
height: 50rem;
}
h1{
font-size: 13.5rem;
text-transform: uppercase;
font-family: 'Fira Sans Heavy';
}
.hide{
display: none;
}
.intro{
font-size: 2rem;
letter-spacing: .15rem;
line-height: 1.5;
width: 45%;
margin-left: 37rem;
margin-top: -22rem;
font-family: 'Fira Sans Light';
}
.btn-class{
display: flex;
justify-content: center;
transition: all 1s ease-in-out;
}
.button-blue{
margin: 10rem 0rem 5rem 10rem;
color: white;
border-radius:1.5rem;
background: linear-gradient(to left, #363795, #005c97);
}
.button-blue:hover{
transform: scale(1.1);
}
main{
margin-top: 7rem;
}
h2{
font-family: 'Fira Sans Extra Bold';
letter-spacing: .18rem;
font-size: 6.5rem;
}
/* .bg-main-small{
background-image: url(../assets/img/splash-drop-small-01.svg);
height: 40rem;
width: 40rem;
background-position: left;
background-repeat: no-repeat;
position: absolute;
margin-left: 5rem;
} */
.bg-main-big{
background-image: url(../assets/img/splash-drop-02-01.svg);
height: 82rem;
width: 300rem;
background-position: right;
background-repeat: no-repeat;
position: absolute;
right: 0;
}
.container-main{
width: 96rem;
margin: 0 auto;
display: flex;
flex-direction: column;
}
.article-1{
display: flex;
flex-direction: column;
margin-top: 30rem;
margin-left: 5rem;
}
.article-text{
margin-top: 2rem;
font-family: "Fira Sans Light";
font-size: 2rem;
letter-spacing: .1rem;
line-height: 3.2rem;
width: 50%;
}
.bg-flow{
margin-top: 5rem;
background-image: url(../assets/img/flow_1.svg);
height: 120rem;
width: 100%;
background-position: center;
background-repeat: no-repeat;
position: absolute;
}
.article-2{
color: white;
display: flex;
flex-direction: column;
align-items: center;
margin-top: 45rem;
}
.mid{
text-align: center;
width: 70%;
}
.button-wit{
color: white;
border-radius: 1.5rem;
margin-top: 5rem;
border: .1rem solid white;
}
.button-wit:hover{
background-color: white;
color: #005c97;
}
.article-3{
display: flex;
margin-top: 45rem;
}
.blue-moonday-text{
display: flex;
flex-direction: column;
padding-left: 5rem;
}
.right{
width: 100%;
}
.footer-img{
background-image: url(../assets/img/footer-splashes-01.svg);
background-repeat: no-repeat;
height: 30rem;
width: 100%;
position: absolute;
}
.container-footer{
width: 96rem;
margin: 0 auto;
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: space-between;
text-align: right;
position: relative;
padding-top: 25rem;
}
footer li{
height: 8rem;
list-style: none;
text-decoration: none;
}
.social-media{
padding-top: 5rem;
display: flex;
justify-content: space-between;
}
.color{
background-image: url(../assets/img/COLOR.svg);
background-repeat: no-repeat;
width: 100%;
height: 30rem;
margin-top: 10rem;
animation-name: fadeInLeft;
animation-duration: 2s;
}
#keyframes fadeInLeft {
from {
opacity: 0;
transform: translate3d(-5%, 0, 0);
}
to {
opacity: 1;
transform: none;
}
}
.button-discover{
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Blue Monday</title>
<link rel="icon" href="./assets/img/devine.png">
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/style.css">
<!-- <link href="https://fonts.googleapis.com/css?family=Fira+Sans" rel="stylesheet"> -->
</head>
<body>
<header>
<div class="bg-header">
<div class="container-header">
<h1 class="hide">Blue Monday</h1>
<nav>
<ul>
<li>home</li>
<li>activiteiten</li>
<li>extra </li>
</ul>
</nav>
<div class="title"></div>
<p class="intro">Het is ondertussen geen geheim meer. Maandagen zijn echt kutdagen. Maar als je er dan eentje moet uitkiezen die de ergste is, dan is het wel deze. </p>
</div>
<div class="btn-class">
Discover more
</div>
</div>
</header>
<main>
<!-- <div class="bg-main-small"></div> -->
<div class="bg-main-big" id="blok1"></div>
<div class="container-main">
<article class="article-1">
<h2>Feeling blue.</h2>
<p class="article-text">Het is amper 2 weken na het nieuwe jaar. Het jaar dat JOUW jaar ging worden... <br> Alleen zijn al je goede voornemens al mislukt, de vakantie lijkt nog mijlenver en bovendien maakt dit weer het geen haar beter. “To feel blue” betekent letterlijk
je rot of triestig voelen en dat is dan ook het gevoel dat je met nog veel andere mensen deelt.</p>
</article>
</div>
<div class="bg-flow">
<div class="container-main">
<article class="article-2">
<h2>Je bent niet alleen.</h2>
<p class="article-text mid">Je staat er niet alleen voor. Iedereen heeft last van deze dag. Elk jaar opnieuw is blue monday de meest depressieve dag ter wereld. Maar wij zullen proberen om blue monday wat meer kleur te geven!</p>
<br>
<span> activiteiten </span>
</article>
<article class="article-3">
<img src="./assets/img/moon-with-holes.svg" alt="Blue Moonday" width="500" height="500" class="blue-moon">
<div class="blue-moonday-text">
<h2>Blue Moonday.</h2>
<p class="article-text right">Voor degene die niet genoeg hebben aan deze tips: er is meer. Denk je dat de sky the limit is? Het kan verder. Veel verder. Zo ver dat je even een tripje naar de maan kan maken op deze dag waardoor je simpelweg blue monday kan overslaan! Laat
deze mensen maar afzien op deze kutdag op aarde, jij bent even gaan viben in space.</p>
</div>
</article>
</div>
</div>
</main>
<footer>
<div class="footer-img"></div>
<div class="container-footer">
<ul>
<li>Home</li>
<li>About</li>
<li>Devine</li>
</ul>
<div class="social-media">
<img src="./assets/img/devine.png" alt="devine" width=50 height=50>
<img src="./assets/img/facebook.png" alt="facebook" width=50 height=50>
<img src="./assets/img/twitter.png" alt="twitter" width=50 height=50>
</div>
</div>
</footer>
</body>
</html>

It actually is not between your header and main, but after your main. The problem is that your main is not expanding because .bg-flow is position: absolute thus is ignored by your main. You also set your .bg-flow to a fixed height which makes it not expanding. If you download Firefox and use "Inspect element" you can see the borders of your elements which will probably help you a lot.

It look like the footer is not by default at the bottom of the page.
You can try this:
footer style='position:fixed;bottom:0px;'

Related

Footer does not stick to bottom

My footer doesn't stick to the bottom when the content of the page is very little, I tried using:
position:absolute;
and
bottom:0;
but it seems to stick, but when I add too much content it goes "under" the footer that remains in the middle of the page.
By under I mean that the text passes under the footer that remains in almost the middle of the page and surpasses it, if needed I can send some pictures of the problem, thanks a lot for your time!
this is the HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/src/app/footer/footer.component.css"> <!--import css footer-->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">
</head>
<body>
<!--parte footer dell'html-->
<footer class="footer">
<div class="flex-wrapper">
<div class="container">
<div class="row">
<div class="footer-col">
<div class="content">
<a href="#"> <!--i link da collegare vanno dove sono presenti gli #-->
<img src="https://i.imgur.com/1yvwx9I.png" >
</a>
</div>
</div>
<div class="footer-col">
<h4>Azienda</h4> <!--titolo-->
<ul>
<li>Chi Siamo</li> <!--elenco degli elementi-->
<li>Contattaci</li>
<li>Placeholder</li>
<li>PlaceHolder</li>
</ul>
</div>
<div class="footer-col">
<h4>Aiuto</h4>
<ul>
<li>FAQ</li>
<li>Consegne</li>
<li>Reso</li>
<li>Informatica privacy</li>
</ul>
</div>
<div class="footer-col">
<h4>Seguici su</h4>
<div class="social-links">
<i class="fab fa-facebook-f"></i> <!--icone dei social-->
<i class="fab fa-twitter"></i>
<i class="fab fa-instagram"></i>
<i class="fab fa-linkedin-in"></i>
</div>
</div>
</div>
</div>
</div>
</footer>
</body>
</html>
this is the CSS
#import url('https://fonts.googleapis.com/css2?family=Poppins:wght#300;400;500;600;700&display=swap');
body {
/* fonto e grandezza font*/
line-height: 1;
font-family: 'Poppins', sans-serif;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container {
width: 100%;
margin: 0 auto;
}
.row {
/*si occupa delle righe, accomoda lo spostamento dell'elenco con il dimensionamento della pagina */
display: flex;
flex-wrap: wrap;
}
ul {
list-style: none;
}
.footer {
/* solamente il colore di background del footer e lo spazio tra gli elementi */
background-color: #24262b;
padding: 20px 0;
}
.footer-col {
/* si occupa delle colonne e del loro ridimensionamento */
width: 25%;
padding: 0;
}
.footer-col h4 {
/*stabilisco la grandezza del font e del colore dei titoli */
font-size: 25px;
color: #ffffff;
text-transform: capitalize;
margin-bottom: 35px;
font-weight: 500;
position: relative;
}
.footer-col h4::before {
/* barra rossa sotto ai titoli */
content: '';
position: absolute;
left: 0;
bottom: -10px;
background-color: #e91e63;
height: 2px;
box-sizing: border-box;
width: 50px;
}
.footer-col ul li:not(:last-child) {
margin-bottom: 10px; /* spazio tra le scritte in verticale */
}
.footer-col ul li a {
/* stato degli elementi dell'elenco pre-hover, potete notare che dispongo qui "transition" cioè il tempo che ci metterà a passare allo stato dell'hover dal suo stato normale e viceversa */
font-size: 16px;
text-transform: capitalize;
color: #ffffff;
text-decoration: none;
font-weight: 300;
color: #bbbbbb;
display: block;
transition: all 0.3s ease;
}
.footer-col ul li a:hover {
/* colore e leggero spostamento quando avviene l'hover (cioè quando ci passa sopra il mouse) */
color: #ffffff;
padding-left: 8px;
}
.footer-col .social-links a {
/* stesso meccaniscmo dei font, qui però inserisco il background-color per il cambiamento del color (color -> background-color)*/
display: inline-block;
height: 40px;
width: 40px;
background-color: rgba(255, 255, 255, 0.2);
margin: 0 10px 10px 0;
text-align: center;
line-height: 40px;
border-radius: 50%;
color: #ffffff;
transition: all 0.5s ease;
}
.footer-col .social-links a:hover {
color: #24262b;
background-color: #ffffff;
}
.content {
display: block;
padding: 10px;
margin: 15px auto;
text-align: center;
font: 25px Georgia, "Times New Roman", Times, serif;
font-size: 14px;
width: 300px;
display: flex;
}
.foot {
display: inline;
line-height: 70px;
}
/* dove si trova il logo, lo inizializzo con un filtro grigio e una transizione di 0.6, uso webkit per la scala di grigio (e anche la transizione solo per webkit), la scala di grigio viene usata perché rende il contrasto con l'hover molto più bello */
.content img {
height: 150px;
width: 150px;
float: left;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-webkit-transition: all .6s ease-in-out;
transition: 0.6s;
}
/* hover del logo */
.content img:hover {
filter: invert(400%);
filter: brightness(4);
-webkit-filter: grayscale(-100);
-webkit-transform: scale(1.10);
}
/* tiene il footer esteso evitando gli spazi sui lati */
footer {
position: absolute;
/* temporaneo, di solito 0px o togli */
right: 0px;
left: 0px;
}
This is what happens when i add bottom:0px;
The best way to make sure your footer always sticks to the bottom is to use a flexbox for your body tag.
HTML & CSS Code Snippet
#import url('https://fonts.googleapis.com/css2?family=Poppins:wght#300;400;500;600;700&display=swap');
body {
/* fonto e grandezza font*/
line-height: 1;
font-family: 'Poppins', sans-serif;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* tiene il footer esteso evitando gli spazi sui lati */
html, body {
height: 100%;
}
body {
display: flex;
flex-direction: column;
}
.content {
/* flex: 1 0 auto; */
flex-direction: column;
}
.footer {
flex-shrink: 0;
}
.container {
width: 100%;
margin: 0 auto;
}
.row {
/*si occupa delle righe, accomoda lo spostamento dell'elenco con il dimensionamento della pagina */
display: flex;
flex-wrap: wrap;
}
ul {
list-style: none;
}
.footer {
/* solamente il colore di background del footer e lo spazio tra gli elementi */
background-color: #24262b;
padding: 20px 0;
}
.footer-col {
/* si occupa delle colonne e del loro ridimensionamento */
width: 25%;
padding: 0;
}
.footer-col h4 {
/*stabilisco la grandezza del font e del colore dei titoli */
font-size: 25px;
color: #ffffff;
text-transform: capitalize;
margin-bottom: 35px;
font-weight: 500;
position: relative;
}
.footer-col h4::before {
/* barra rossa sotto ai titoli */
content: '';
position: absolute;
left: 0;
bottom: -10px;
background-color: #e91e63;
height: 2px;
box-sizing: border-box;
width: 50px;
}
.footer-col ul li:not(:last-child) {
margin-bottom: 10px; /* spazio tra le scritte in verticale */
}
.footer-col ul li a {
/* stato degli elementi dell'elenco pre-hover, potete notare che dispongo qui "transition" cioè il tempo che ci metterà a passare allo stato dell'hover dal suo stato normale e viceversa */
font-size: 16px;
text-transform: capitalize;
color: #ffffff;
text-decoration: none;
font-weight: 300;
color: #bbbbbb;
display: block;
transition: all 0.3s ease;
}
.footer-col ul li a:hover {
/* colore e leggero spostamento quando avviene l'hover (cioè quando ci passa sopra il mouse) */
color: #ffffff;
padding-left: 8px;
}
.footer-col .social-links a {
/* stesso meccaniscmo dei font, qui però inserisco il background-color per il cambiamento del color (color -> background-color)*/
display: inline-block;
height: 40px;
width: 40px;
background-color: rgba(255, 255, 255, 0.2);
margin: 0 10px 10px 0;
text-align: center;
line-height: 40px;
border-radius: 50%;
color: #ffffff;
transition: all 0.5s ease;
}
.footer-col .social-links a:hover {
color: #24262b;
background-color: #ffffff;
}
.content {
display: block;
padding: 10px;
margin: 15px auto;
text-align: center;
font: 25px Georgia, "Times New Roman", Times, serif;
font-size: 14px;
width: 300px;
display: flex;
}
.foot {
display: inline;
line-height: 70px;
}
/* dove si trova il logo, lo inizializzo con un filtro grigio e una transizione di 0.6, uso webkit per la scala di grigio (e anche la transizione solo per webkit), la scala di grigio viene usata perché rende il contrasto con l'hover molto più bello */
.content img {
height: 150px;
width: 150px;
float: left;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-webkit-transition: all .6s ease-in-out;
transition: 0.6s;
}
/* hover del logo */
.content img:hover {
filter: invert(400%);
filter: brightness(4);
-webkit-filter: grayscale(-100);
-webkit-transform: scale(1.10);
}
<body>
<!--parte footer dell'html-->
<div class="content">
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
</div>
<footer class="footer">
<div class="flex-wrapper">
<div class="container">
<div class="row">
<div class="footer-col">
<div class="content">
<a href="#"> <!--i link da collegare vanno dove sono presenti gli #-->
<img src="https://i.imgur.com/1yvwx9I.png" >
</a>
</div>
</div>
<div class="footer-col">
<h4>Azienda</h4> <!--titolo-->
<ul>
<li>Chi Siamo</li> <!--elenco degli elementi-->
<li>Contattaci</li>
<li>Placeholder</li>
<li>PlaceHolder</li>
</ul>
</div>
<div class="footer-col">
<h4>Aiuto</h4>
<ul>
<li>FAQ</li>
<li>Consegne</li>
<li>Reso</li>
<li>Informatica privacy</li>
</ul>
</div>
<div class="footer-col">
<h4>Seguici su</h4>
<div class="social-links">
<i class="fab fa-facebook-f"></i> <!--icone dei social-->
<i class="fab fa-twitter"></i>
<i class="fab fa-instagram"></i>
<i class="fab fa-linkedin-in"></i>
</div>
</div>
</div>
</div>
</div>
</footer>
</body>
You could even add a header above that or more stuff below. The trick with flexbox is either:
flex: 1 on the child you want to grow to fill the space (the
content, in our case).
or, margin-top: auto to push the child away as far as it will go
from the neighbor (or whichever direction margin is needed).
To check more ways for this purpose you can check this article "https://css-tricks.com/couple-takes-sticky-footer/"
Here is the link for Codepen as well

How to align two divs with html css?

I would like to align two divs but it's not working.
<!DOCTYPE html>
<html lang="fr">
<head>
<title>ELOUANN'S SITE</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="../css/index.css"/>
<link rel="icon" type="image/png" href="../img/webdev.png"/>
</head>
<body>
<div id="headDiv">
<div id="headDivTitle">
<img src="../img/webdev.png" width="10%"/><a class="trait">|</a><a>ELOUANN'S SITE</a>
</div>
<div id="headDivFile">
<a id="indexFile" href="./index.html">Accueil</a>
<a class="next">></a>
<a class="anyfile">...</a>
</div>
</div>
<div id="contentDiv">
<div id="rightDiv" class="content">
<div id="rightDivDescription">
<div id="border">
<a>Bienvenue ! Ici tu vas pouvoir apprendre quelques éléments de base du HTML et du CSS, ainsi que l'accès à un memento qui te permettra d'avoir une liste de chaque éléments de chaque langage accompagné d'une description, afin de pouvoir les utiliser à des fins personnelles !</a>
</div>
</div>
</div>
<div id="buttonsDiv" class="content">
<div id="buttonsDivHtml">
<img src="../img/languages/030-html-5.png" width="10%"/>Apprendre le HTML
</div>
<div id="buttonsDivCss">
<img src="../img/languages/031-css.png" width="10%"/>Apprendre le CSS
</div>
</div>
</div>
</body>
</html>
This is my html file. I would like align "buttonsDiv" and "rightDiv".
This is my css file :
/* STYLE DU TITRE ET DE L'IMAGE */
body{
background-color: #efecca;
font-family: Bahnschrift Light;
}
body div#headDiv{
background-color: #002f2f;
padding-top: 2%;
padding-left: 5%;
padding-bottom: 2%;
box-shadow: 0px 0px 100px black;
}
body div#headDiv div#headDivTitle a{
vertical-align: middle;
font-size: 250%;
color: #e6e2af;
}
body div#headDiv div#headDivTitle img{
vertical-align: middle;
}
body div#headDiv div#headDivTitle a.trait{
font-size: 420%;
margin-left: 1.5%;
margin-right: 3%;
color: #6f6c52;
}
/* STYLE DU TEXTE DES FICHIERS */
body div#headDiv div#headDivFile {
margin-left: 7%;
margin-top: 3%;
}
body div#headDiv div#headDivFile a{
font-size: 150%;
color: #e6e2af;
}
body div#headDiv div#headDivFile a.next{
font-size: 170%;
margin: 5%;
color: #6f6c52;
}
/* STYLE DE LA BOITE DE DROITE ET DE LA DESCRIPTION */
body div#contentDiv div#rightDiv{
background-color: #002f2f;
margin-top: 2%;
margin-bottom: 2%;
box-shadow: 0px 0px 10px black;
margin-right: 80%;
font-size: 175%;
}
body div#contentDiv div#rightDiv div#rightDivDescription{
padding: 10%;
color: #e6e2af;
}
body div#contentDiv div#rightDiv div#rightDivDescription div#border{
box-shadow: -10px 0px 0px #046380;
}
/* STYLE DES BOUTONS */
body div#contentDiv div#buttonsDiv div img{
vertical-align: middle;
}
body div#contentDiv div#buttonsDiv div a{
vertical-align: middle;
}
and when i use this, it gives me that :
https://cdn.discordapp.com/attachments/760957022686019625/760957040775397406/unknown.png
Please help me soon. Thanks you all. Bye
I would suggest you to make a few changes:
don't use margin-right in #rightDiv. Instead you can use width: 20%; if you want that much width is acquired by the div. Also use float: left;. May be you will get your intended result.

Fixed footer falls over content

I need to make a simple CSS website. But I have a problem with my fixed footer. It falls over my buttons. I have tried making it an inline-block element. Then it stays right under the buttons. But when I resize the page it goes over my brandstory class. Is there any way to fix this problem? I'm new to CSS.
.main-navigation li{
display: inline-block;
margin: 0.1% 1%;
padding: 0%;
}
a{
color: white;
text-decoration: none;
}
.current{
text-decoration: underline;
}
.brandstory{
position: absolute;
margin-right: 25%;
height: 500px;
}
img{
width: 25%;
margin-left: 75%;
display: block;
}
.item-of-the-month{
color: black;
}
.text-block{
margin-left: 75%;
border: 1px solid black;
margin-top: 0%;
padding-top: 1%;
padding-bottom: 1%;
background: white;
text-align: center;
}
.buttons{
margin-left: 75%;
}
.button{
background-color: #000;
border: 1px solid red;
margin-top: -1.2%;
padding: 1%;
color: white;
font-family: Georgia,Times,Times New Roman,serif;
text-align: center;
text-decoration: none;
display: block;
}
.ForwardFashion{
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background-color: black;
color: white;
text-align: left;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ForwardFashion</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="style.css" type="text/css" rel="stylesheet">
</head>
<body>
<div class="header">
<h1>ForwardFashion</h1>
</div>
<div class="main-navigation">
<li><h3>Home</h3></li>
<li><h3>Interviews</h3></li>
<li><h3>Webshop</h3></li>
</div>
<div class="brandstory">
<p>ForwardFashion is sinds 2018 de place to be, als het gaat om upcoming fashionhypes. ForwardFashion biedt naast fashionnieuws ook de allerhipste fashionitems aan. Daarnaast interviewen designers en influencers met een forward-kijk op fashion. ForwardFashion is niet voor niets Forward. Waar andere fashionsites in het verleden blijven hangen, kijken wij verder. Wij schuwen niet voor mode met technologie. Dat zou jij ook niet moeten doen! Dus waar wacht je op, kijk rond in onze webshop, ga lekker zitten voor een interview en blijf op de hoogte in ForwardFashionland.</p>
</div>
<div class="container">
<img src="images/glassboots.jpg">
<div class="text-block">
<h4>Item of the Month</h4>
</div>
</div>
<div class="buttons">
Instagram
Youtube
Pinterest
Twitter
</div>
<footer class="ForwardFashion">
<p>© ForwardFashion</p>
</footer>
</body>
</html>
One thing you need to consider when you are making your footer fixed is, you have to leave some space in <body> element so that the fixed footer gets some space to avoid it overlapping the content part. Try this code
body {
padding-bottom: 100px;
}

Horizontal images scroll, text inside goes overboard

The text inside my divs goes over to the next image, from my image horizontal scroll. I want each text inside each image but I am trying everything and nothing works!
The overlapping text is caused by the white-space: nowrap; on the .list-inline selector. So lets add white-space: normal; to the .DocumentList p selector to fix this.
Here is the full updated CSS:
.factorSection{
display:none;
}
#section2-05{
padding-right:0;
padding-left: 10px;
padding-bottom:0;
}
#section2-05 h2{
color: #424242;
font-weight:900;
font-size: 1.7em;
line-height: 1.2em;
margin-bottom: 0;
}
#section2-05 .col-lg-12 p{
font-size: 1.2em;
line-height: 1.4em;
margin-bottom:1em;
}
.section2-05_phone{
display:block;
overflow-x: scroll;
width: auto;
white-space: nowrap;
}
.documentList{
overflow-x:scroll;
overflow-y:hidden;
height:200px;
width:100%;
padding: 0 15px;
}
.factorImgText{
position:absolute;
z-index: 1;
padding: 0 5px;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
margin: 0;
text-align: center;
width:90%;
}
.factorImg1, .factorImg2, .factorImg3, .factorImg4{
position: relative;
display: inline-block;
margin: 8px 8px;
box-shadow: 2px 2px 4px #bbb;
border-top-right-radius: 4px;
width: 320px;
height: 100%;
vertical-align: bottom;
background-position: top left;
background-repeat: no-repeat;
background-size: cover;
height:370px;
}
.factorImg1{
background-image: url('https://images.unsplash.com/photo-1504151046121-7fed23ebed42?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=57b654bb2ec29b612049176a9abd8cd6');
margin-right:3px;
}
.factorImg2{
background-image: url('https://images.unsplash.com/photo-1504151046121-7fed23ebed42?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=57b654bb2ec29b612049176a9abd8cd6');
margin-right:3px;
}
.factorImg3{
background-image: url("https://images.unsplash.com/photo-1504151046121-7fed23ebed42?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=57b654bb2ec29b612049176a9abd8cd6");
margin-right:3px;
}
.factorImg4{
background-image: url("https://images.unsplash.com/photo-1504151046121-7fed23ebed42?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=57b654bb2ec29b612049176a9abd8cd6");
margin-right:3px;
}
.list-inline {
white-space:nowrap;
}
.DocumentList h6, .DocumentList p{
color:#fff;
font-weight:900;
}
.DocumentList h6{
font-size: 1em;
text-align: center;
width: 100%; /* Changed from 90% --> 100% to help center. */
margin: 0; /* Added to help center. */
}
.DocumentList p{
font-size: .75em;
line-height: 1.4em;
margin-bottom: 0;
white-space: normal; /* Add to fix the overlapping text. */
}
<div class="row row-fluid section2-05_phone">
<div class="DocumentList col-lg-12">
<ul class="list-inline">
<li class="factorImg1">
<div class="factorImgText">
<h6>2 DÍAS ANTES… ¡ZURPRAIS!</h6>
<p>Con tu pack de experiencias, tu edad y tu perfil (familias, parejas, amig#s…), organizaremos tu plan… Y como es Zurprais, 2 días antes sabrás lo que es.</p>
</div>
<div class="overlay1"></div>
</li>
<li class="factorImg2">
<div class="factorImgText">
<h6>PLANES CON UN PLUS</h6>
<p>Un atardecer en velero… ¿con cava y ostras? Un brunch… ¿entre viñedos? Todas tus experiencias tendrán un toque extra que las hará aún más especiales.</p>
</div>
<div class="overlay2"></div>
</li>
<li class="factorImg3">
<div class="factorImgText">
<h6>EMOCIÓN DESDE LA RESERVA</h6>
<p>Al reservar, empieza el juego. Recibirás algunas pistas sobre las actividades que te podrían tocar. Para que vayas calentando motores.</p>
</div>
<div class="overlay3"></div>
</li>
<li class="factorImg4">
<div class="factorImgText">
<h6>CAMBIO GRATUITO</h6>
<p>¡Segurísimo que tu plan te va a encantar! Pero para que estés tranquil#: si no te gusta lo que te hemos organizado, te preparamos uno diferente para otro día.</p>
</div>
<div class="overlay4"></div>
</li>
</ul>
</div>
</div>

How to get rid of space between buttons and content/paragraph? (CSS)

I am making a manual with html/css/js and to go through the manual I made two buttons.
This is what it looks like:
The strange this is, the first previewed menu-item 'introductie' has the same css code as the fourth previewed menu-item 'hart meten'. But why is there a gap between the paragraph and the buttons in the previewed 'introductie' ?
my code:
HTML
<!DOCTYPE html>
<html lang="nl">
<head>
<meta charset="utf-8"/>
<title>Hartmeting</title>
<link rel="stylesheet" href="css/stylesheet.css" type="text/css">
</head>
<body>
<div id="wrapper">
<header>
<div id="logo" onclick="window.location.href='http://localhost/Zorg_Heartbeat%20Manual/'">
<img src="img/logo.png" alt="logo" />
<h1 >Hartmeting voor fitte mensen</h1>
</div>
</header>
<!-- Stappenplan Menu -->
<nav id="menu">
<ul>
<li> Introductie </li>
<li> Het Probleem </li>
<li> Stappenplan </li>
<li> Hartmeting </li>
</ul>
</nav>
<!-- HET STAPPENPLAN -->
<div id="content">
<!-- Intro Slide -->
<article id="menu_a">
<h2>Introductie</h2><br>
<figure>
<img src="img/intro1.jpeg" alt="Intro Afbeelding"/>
</figure>
<p>Joggers zijn actieve mensen die graag tussen werk en/of studie nog even de kilometers willen pakken. Hierin houden ze graag bij of ze fitter worden of niet, zo zul je vaak zien dat joggers hun rusthartslag meten om een indicatie van positieve 'progress' te kunnen inzien. Het bijhouden van de gezondheid hoort eigenlijk niet alleen bij joggers, maar bij elk fit persoon die graag de resultaten wilt vastpakken. Zonder dat je een smartwatch nodig hebt, kun je met elk apparaat die beschikking heeft tot het internet, je hartslag meten!</p>
</article>
<!-- Slide 1 -->
<article id="menu_b">
<h2>Het Probleem</h2><br>
<figure>
<img src="img/hetprobleem1.jpg" alt="Eerste Afbeelding"/>
</figure>
<p>Maar waarom een WebApp die je hartslag meet? Simpel, smartwatches zijn nou eenmaal veels te duur, je gebruikt ze niet altijd en daarnaast zijn ze de meeste ook nog eens privacy gevoelig.</p>
</article>
<!-- Slide 2 -->
<article id="menu_c">
<h2>Hoe kan mijn hartslag meten?</h2><br>
<figure>
<img src="img/polsmeten.png" alt="Tweede Afbeelding"/>
</figure>
<ol id="stappen">
<li>Ga gerust zitten.</li>
<li>Houd je wijsvinger en middelvinger tegen elkaar.</li>
<li>Leg beide vingers links of rechts van de adamsappel (zoek naar een kloppende beweging).</li>
<li>Klik met je linker muisknop op de box elke keer dat je een klopping voelt.</li>
<li>Doe dit achtereenvolgend tot dat je 10 keer hebt geklikt (dus 10 kloppingen).</li>
<li>De pop-up laat je gemiddelde hartslag per minuut zien.</li>
</ol>
</article>
<!-- Slide 3 -->
<article id="menu_d">
<h2>Hart Meten</h2><br>
<figure>
<!-- Hartmeet tool -->
<div id="klik_Hart" class="heart">
</div>
<br>
<br>
<br>
<!-- Einde hartmeet tool-->
</figure>
<ol id="stappen">
<li>Een normaal rustend hart van een volwassenen meet tussen de 60 - 100 hartslagen per minuut.</li>
<li>Boven de 100 is slecht.</li>
<li>Richting de 40 is goed.</li>
</ol>
</article>
<!-- ABOUT -->
<!-- <div id="about">
<p>TEST TEST TEST TEST TEST TEST TEST TEST TEST </p>
</div> -->
<!-- vorige/volgende buttons -->
<table id="volgorde">
<th><button class="button" id="previous">Previous</button></th>
<th><button class="button" id="next">Next</button></th>
<th>
<!-- Checkbox Auto Slider -->
<div class="auto_menu">
<input type="checkbox" id="checkbox">
<label for="checkbox">Auto Handleiding</label>
</div>
<!-- -->
</th>
</table>
<div id="myNav" class="overlay">
×
<div class="overlay-content">
<p> Wij zijn ....</p>
</div>
</div>
</div>
<div id="buffer"></div>
<footer>
<a id="footer_" href="#" onclick="openNav()">☰ Over ons </a>
</footer>
</div>
<script src="js/jquery-3.1.1.js" type='text/javascript'></script>
<script src="js/scripts1.js" type='text/javascript'></script>
</body>
</html>
CSS
#titel{ color: #B0C4DE; text-align: center;}
/*Verstop alle artikelen binnen content*/
article {
display:none;
}
body{
background-color: #333333;
color: grey;
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
font-size: 12pt;
width: 100%%
}
#wrapper{
background-color: #ADD8E6;
width: 90%;
margin-left: auto;
margin-right: auto;
/*background-image: url("../img/bg.jpg");*/
background-size: cover;
background-position: left top;
border: 2px groove #001f3f;
overflow: auto;
}
#content{
margin-left: auto;
margin-right: auto;
float: left;
width: 70%;
}
#content img{
height: 250px;
width: 450px;
}
#menu{
font-weight: thin;
color: #424242;
float: left;
width: 15%;
text-align: center;
margin-left: 5%;
margin-top: 6.7%;
font-size: 10pt;
}
ul{list-style-type: none;}
h1{ text-shadow: 1px 1px 3px #00008B;}
a{
display: block;
text-decoration: none;
color: #0074D9;
background-color: #001f3f;
border: 1px solid #B0C4DE;
padding: 5px;
}
a:hover{
background-color: #FFD900;
color: #001f3f;
}
footer{
overflow: hidden;
clear: both;
}
#volgorde{
font-weight: thin;
color: grey;
width: 10%;
text-align: center;
clear: both;
margin-left: 3%;
margin-bottom: 2%;
}
.button {
background-color: #001f3f;
color: #FFDC00;
border: none;
color: white;
padding: 5px 30px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 14px;
display: block;
}
.button:hover{
background-color: #FFD900;
color: #001f3f;
}
.heart{
color:#FBF9FF;
background-image: url("../img/hart4.png");
background-size: 150px 150px;
height: 150px;
width: 150px;
}
.heart:hoover{
color: #FFA07A;
background-color: grey;
}
#uitleg p {
color: #FA8072;
}
#logo img {
float: left;
width: 60px;
height: 60px;
margin-left: 2%;
}
#logo h1 {
position: relative;
top: 15px;
left: 10px;
}
#klik_ {
text-align: center;
}
article p {
height: 200px;
width: 450px;
font-size: 10pt;
color: grey;
font-weight: bold;
overflow: scroll;
margin-left: 4%;
margin-bottom: 5%;
text-align: justify;
text-justify: inter-word;
}
#buffer{
clear: both;
height: 10%;
}
#stappen{
font-weight: bold;
font-size: 10pt;
}
.auto_menu {
position: relative;
margin: 5px auto;
width: 160px;
font-size: 14px;
}
/*OVER ONS OVERLAY*/
.overlay {
height: 0%;
width: 100%;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0, 0.9);
overflow-y: hidden;
transition: 0.5s;
}
.overlay-content {
position: relative;
top: 25%;
width: 100%;
text-align: center;
margin-top: 30px;
}
.overlay a {
padding: 8px;
text-decoration: none;
font-size: 36px;
color: #818181;
display: block;
transition: 0.3s;
}
.overlay a:hover, .overlay a:focus {
color: #f1f1f1;
}
.overlay .closebtn {
position: absolute;
top: 20px;
right: 45px;
font-size: 60px;
}
#media screen and (max-height: 450px) {
.overlay {overflow-y: auto;}
.overlay a {font-size: 20px}
.overlay .closebtn {
font-size: 40px;
top: 15px;
right: 35px;
}
}
EDIT: Web Inspector Shows:
Screenshot showing findings
So I think it might be:
margin-bottom: 5%;
when I deleted this, nothing happened..
You defined the height of your p. That means that your element will always stay at the height of 200px, no matter the content inside the element.
In order to change that to a dynamic height change it to:
display: inline-block;
height: auto;
The code is pretty straight forward, you display what is within the block. The height is automatically adjusted depending on the inline of that block.