Remove White Space Under Footer

How to remove blank white space below footer?

Your code shows nothing, perhaps you can't reveal your web address no problem.
You need to check something in your html any div or content area have minus value like top:-100px if you set something like this you need to change like margin-top:-100px

Removing Small White Space Under Footer

Well this is because of overflow, you need to use overflow:hidden in your css like this

.footerWrapper {
overflow:hidden;
}

It'll be all fine

Cannot remove white space below footer

Firt of all, edit this .footer-notes css and remove left:100px; from it. It is making your page width greater then 100%

.footer_notes{
position: relative;
text-align: center;
bottom: 10px;
padding-left: 100px;
overflow: hidden;
max-width:100%;
}

then dont declare height on .third-bar this makes your footer come up even if their is content above the footer

.third_bar{
background:#000000;
position: relative;
}

Even after doing this your footer will have maybe 20px or so space below it because their is not enough content above it. If you want your footer to always stay at bottom in any device then add this to your footer's css.

.footer{
position:fixed;
background: #000000;
color: #ffffff;
bottom:0px;
width:100%;
}

If you go through with all three changes this is what your page will look like :

function active(){   var search_bar= document.getElementById('search_bar');  if(search_bar.value == 'Search'){  search_bar.value=''  search_bar.placeholder= 'Search'  }  } 
function inactive(){ var search_bar= document.getElementById('search_bar'); if(search_bar.value == ''){ search_bar.value='Search' search_bar.placeholder= '' } }
body { background: #efefef; margin: 0 auto; font-family: Verdana,Arial,sans-serif;}
#container{ display:flex; flex-direction:column; height:100vh; overflow:hidden; background-color:black}
.top_section { background:#000000; padding: 20px;}
.first_image{ position: relative; text-align: center;}.nav_bar { background: #222b2f; border: 10px; solid #222B2F; font-size: 18px; font-weight: bold; text-transform: none; padding-top: 20px; padding-bottom: 20px; text-align: center;}
.nav_bar a{ position: relative; color:#ffffff; text-decoration:none; padding: 20px;}
.nav_bar a:hover{ color: #ffffff; text-decoration:underline;}
.third_bar{ background:#000000; position: relative;
}
.second_image{ position: relative; text-align: center; height:80vh; background-image: url("http://cdn.wonderfulengineering.com/wp-content/uploads/2016/01/nature-wallpapers-10.jpg"); background-position:center; background-repeat:no-repeat; background-size:cover;}
#search_bar{ position: relative; bottom: 50px; height: 150px; border:1px solid #000000; border-right: none; font-size: 36px; padding: 10px; outline:none; width: 800px; -webkit-border-top-left-radius:10px; -webkit-border-botton-left-radius: 10px; -moz-border-radius-topleft: 10px; -moz-border-radius-bottomleft:10px; border-top-left-radius: 10px; border-bottom-left-radius: 10px; right:110px;}
#search_button{ position: relative; width: 200px; bottom: 222px; height: 172px; border: 1px solid #000000; font-size: 36px; padding: 10px; background: #f1d826; font-weight: bold; cursor: pointer; outline: none; -webkit-border-top-right-radius:10px; -webkit-border-botton-right-radius: 10px; -moz-border-radius-topright: 10px; -moz-border-radius-bottomright:10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; left: 710px;}
#search_button:hover{background:#f6e049;}

.form{ width:200px; margin-top: -300px; padding-left:280px;
}
.footer{ position: fixed; background: #000000; color: #ffffff; bottom: 0px; width:100%;
}.copyright{position: relative;bottom: -8px;left: 0px;overflow: hidden;}
.footer_notes
{
position: relative;text-align: center;bottom: 10px;margin-left: 100px;overflow: hidden;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><div id="container"> 
<div class="top_section"> <div class="first_image"> <a href="#"><img src="logo.png"/></a> </div> </div>
<div class="nav_bar"> <a href ="#"> Home</a> <a href ="#"> Search</a> <a href ="#"> About us</a> <a href ="#"> Products & Pricing</a> <a href ="#"> Contact us</a> <a href ="#"> login</a> </div>
<div class="third_bar"> <div class="second_image"> </div> <div class="form"><form action= "search.php" method="post"> <input type="text" id="search_bar" placeholder="" value="Search for your whisky here" max length="30" autocomplete="off" onMouseDown="active();" onBlur="inactive();"/><input type="submit" id="search_button" value="Go!"/> </form> </div> </div> <div class="footer"> <div class="copyright"> © test.com ® </div> <div class="footer_notes"> test.com is a one of a kind fully automated and repsosive database of over 40,000 items. Second to none on ther Internet. </div> </div> </div>

Getting rid of white space below footer

In your CSS, you are using 50px margin for both the top and bottom of the footer.

Remove the margin from your footer.

If you want to apply margin only on the top of the footer, use this:

footer {
margin: 50px 0 0 0; /* or just use: margin-top: 50px;*/
}

UPDATED CODE

I have a white space underneath my footer and I can't find the reason why

it's coming from the padding your are applying to the link in the copyright section. Since it's an inline element the padding will not contribute to the layout and will overflow from the top and bottom create that white line.

Add inline-block to that element to avoid the issue

.copyright a {
display: inline-block;
}

Full code:

/*
MenuToggle
*/
$(document).ready(function() {
$('.menu-toggle').click(function() {
$('nav').toggleClass('active')
})
})
/*
Current year in footer
*/
document.getElementById("year").innerHTML = new Date().getFullYear();
* {
box-sizing: border-box !important;
}

.clearfix::after {
display: block;
clear: both;
content: "";
}

.row {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}

.row::after {
content: "";
clear: both;
display: table;
}

.container {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}

@media (min-width: 576px) {
.container {
max-width: 540px;
}
}

@media (min-width: 768px) {
.container {
max-width: 720px;
}
}

@media (min-width: 992px) {
.container {
max-width: 960px;
}
}

@media (min-width: 1200px) {
.container {
max-width: 1140px;
}
}

/* ---------- */

/* COL-JUSTGRID */

/* ---------- */

/* Voor mobiele telefoons */

[class*="col-"] {
width: 100%;
padding: 5px;
}

/* Extra kleine modellen (Telefoons, 600px en minder) */

@media only screen and (max-width: 576px) {
/* GRID voor Extra kleine modellen */
.col-xs-1 {
width: 8.33%;
}
.col-xs-2 {
width: 16.66%;
}
.col-xs-3 {
width: 25%;
}
.col-xs-4 {
width: 33.33%;
}
.col-xs-5 {
width: 41.66%;
}
.col-xs-6 {
width: 50%;
}
.col-xs-7 {
width: 58.33%;
}
.col-xs-8 {
width: 66.66%;
}
.col-xs-9 {
width: 75%;
}
.col-xs-10 {
width: 83.33%;
}
.col-xs-11 {
width: 91.66%;
}
.col-xs-12 {
width: 100%;
}
.xs-hide {
display: none;
!important
}
}

/* Kleine modellen (portrait tablets en grote telefoons, 600px en meer) */

@media only screen and (min-width: 576px) {
/* GRID voor Kleine modellen */
.col-s-1 {
width: 8.33%;
}
.col-s-2 {
width: 16.66%;
}
.col-s-3 {
width: 25%;
}
.col-s-4 {
width: 33.33%;
}
.col-s-5 {
width: 41.66%;
}
.col-s-6 {
width: 50%;
}
.col-s-7 {
width: 58.33%;
}
.col-s-8 {
width: 66.66%;
}
.col-s-9 {
width: 75%;
}
.col-s-10 {
width: 83.33%;
}
.col-s-11 {
width: 91.66%;
}
.col-s-12 {
width: 100%;
}
.s-hide {
display: none;
!important
}
}

/* Medium modellen (landschap tablets, 768px en meer) */

@media only screen and (min-width: 768px) {
/* GRID voor Medium modellen */
.col-m-1 {
width: 8.33%;
}
.col-m-2 {
width: 16.66%;
}
.col-m-3 {
width: 25%;
}
.col-m-4 {
width: 33.33%;
}
.col-m-5 {
width: 41.66%;
}
.col-m-6 {
width: 50%;
}
.col-m-7 {
width: 58.33%;
}
.col-m-8 {
width: 66.66%;
}
.col-m-9 {
width: 75%;
}
.col-m-10 {
width: 83.33%;
}
.col-m-11 {
width: 91.66%;
}
.col-m-12 {
width: 100%;
}
.m-hide {
display: none;
!important
}
}

/* Grote modellen (laptops/desktops, 992px en meer) */

@media only screen and (min-width: 992px) {
/* GRID voor Grote modellen */
.col-l-1 {
width: 8.33%;
}
.col-l-2 {
width: 16.66%;
}
.col-l-3 {
width: 25%;
}
.col-l-4 {
width: 33.33%;
}
.col-l-5 {
width: 41.66%;
}
.col-l-6 {
width: 50%;
}
.col-l-7 {
width: 58.33%;
}
.col-l-8 {
width: 66.66%;
}
.col-l-9 {
width: 75%;
}
.col-l-10 {
width: 83.33%;
}
.col-l-11 {
width: 91.66%;
}
.col-l-12 {
width: 100%;
}
.l-hide {
display: none;
!important
}
}

/* Extra grote modellen (Grote laptops en desktops, 1200px en meer) */

@media only screen and (min-width: 1200px) {
/* GRID Extra grote modellen */
.col-xl-1 {
width: 8.33%;
}
.col-xl-2 {
width: 16.66%;
}
.col-xl-3 {
width: 25%;
}
.col-xl-4 {
width: 33.33%;
}
.col-xl-5 {
width: 41.66%;
}
.col-xl-6 {
width: 50%;
}
.col-xl-7 {
width: 58.33%;
}
.col-xl-8 {
width: 66.66%;
}
.col-xl-9 {
width: 75%;
}
.col-xl-10 {
width: 83.33%;
}
.col-xl-11 {
width: 91.66%;
}
.col-xl-12 {
width: 100%;
}
.xl-hide {
display: none;
!important
}
}

* {
box-sizing: border-box !important;
}

html {
margin: 0;
}

body {
margin: 0;
padding: 0;
color: #333333;
font-family: mr-eaves-modern, sans-serif;
font-style: normal;
font-weight: 100;
font-size: 20px;
}

/* Header section */

header {
margin: 0;
padding: 0;
width: 100%;
height: 100px;
background-color: #fff;
border-bottom: 1px solid #eee;
}

header .hbrand {
float: left;
font-family: bebas-neue, sans-serif;
font-style: normal;
font-weight: 400;
font-size: 30px;
line-height: 100px;
padding: 0 5px 0 5px;
}

header nav {
float: right;
padding: 0 5px 0 5px;
}

header nav ul {
margin: 0;
padding: 0;
display: flex;
}

header nav ul li {
list-style: none;
}

header nav ul li a {
padding: 0 8px 0 8px;
text-decoration: none;
color: #333333;
font-size: 20px;
line-height: 100px;
}

header nav ul li a.active,
header nav ul li a:hover {
font-weight: bold;
}

.menu-toggle {
float: right;
line-height: 100px;
cursor: pointer;
display: none;
}

@media (max-width: 992px) {
header {
margin: 0;
padding: 0 10px 0 10px;
}
header nav {
position: absolute;
width: 100%;
height: calc(100vh - 100px);
background-color: #fff;
top: 100px;
left: -100%;
transition: 0.5s;
}
header nav.active {
left: 0;
}
header nav ul {
text-align: center;
display: block;
}
header nav ul li a {
line-height: 75px;
}
.menu-toggle {
display: block;
}
}

/* Main section */

main {
margin: 5px 0 5px 0;
padding: 0;
}

/* Footer section */

footer {
margin: 0;
padding: 10px 0 10px 0;
}

.copyright,
.copyright a {
padding: 5px 0 5px 0;
color: white;
font-style: normal;
font-weight: 50;
font-size: 15px;
text-align: center;
text-decoration: none;
}

.copyright a {
display: inline-block;
}

/* Backgrounds */

.b-white {
background-color: #FFF;
}

.b-black {}

.b-darkgray {
background-color: #191919;
}

.b-gray {
background-color: #F5F5F5;
}
<!doctype html>
<html lang="nl">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>New website</title>
<!-- Stylesheets -->
<link rel="stylesheet" href="assets/css/justgrid.css" type="text/css">
<!-- JustGrid -->
<link rel="stylesheet" href="assets/css/theme.css" type="text/css">
<!-- Theme stylesheet-->
<!-- Javascripts -->
<script src="https://kit.fontawesome.com/a9b20b17fc.js"></script>
<!-- Fontawesome icons -->
</head>

<body class="b-gray">
<!-- header -->
<header>
<div class="container">
<div class="hbrand">Logo</div>
<nav>
<ul>
<li><a href="#">link 1</a></li>
<li><a href="#">link 2</a></li>
<li><a href="#">link 3</a></li>
</ul>
</nav>
<div class="menu-toggle"><i class="fas fa-bars" aria hidden="true"></i></div>
</div>
</header>
<!-- Main -->
<main>
<div class="container">
<div class="row">
<div class="col-s-12 col-m-3">
<div class="container b-white">
"But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human
happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves
or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical
exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?" Section 1.10.33
of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC "At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati
cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque
nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint
et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat." 1914 translation by H. Rackham "On the other hand, we
denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs
to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled
and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur
that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse
pains."
</div>
</div>
<div class="col-s-12 col-m-9">
<div class="container b-white">
Content
</div>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="b-white">
<div class="container">
<div>First footer part</div>
</div>
</footer>
<div class="copyright b-darkgray">
<div class="container">
<div>© Kopierechten 1999-<span id="year"></span> - <a href="#">Disclaimer</a></div>
</div>
</div>
<!-- scripts -->
<script src="https://code.jquery.com/jquery-3.4.1.js"></script>
<script src="assets/js/theme.js"></script>
</body>

</html>

How to remove this white HTML space below footer?

I tried the given solutions from others to make sure none already did the trick on your page, but no success.

I then found the reason you're getting the issue. It's related to the :before of the news section, it's overflowing from the element.

Try adding this CSS :

#news {
overflow: hidden;
}

Now the news section crops the :before element relative to its own dimensions.
I noticed you achieved the layout with skew, but I recommend you to look into clip path generators and create this shape that way.

How to remove white-space from the bottom of footer

this is how to remove white-space from the bottom of footer

body {
padding-bottom: 0px !important;
margin-bottom: -40px !important;
}
footer.well{
margin-bottom: -20px !important;
}


Related Topics



Leave a reply



Submit