Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I design the website to be responsive as possible.But unfortunately, White Space Below Footer appear on small screens only in some website page?


How to remove this White space below the footer?

What I have tried:

HomePage[^]



The above is link to the pages i work on
Posted
Updated 9-Oct-18 2:13am
v2

You could implement sticky footer on your page very easily which would force the footer to the bottom of the view port if the content is insufficient to fill the height.
 
Share this answer
 
1)Add a div around your entire page like wrapper 
<body>
<div class="wrapper">
    <header>
...
   </footer>
</div> <!-- /wrapper -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
 <script src="js/index.js"></script>
</body>
</html>


then add this CSS

html,body {height:100%;}
body {margin:0;}
.wrapper {
    display:table;
    width:100%;
    height:100%;
}
header,main,footer {display:table-row;}
header,footer {height:1px;}
 
Share this answer
 
Comments
Richard Deeming 9-Oct-18 11:44am    
Why have you posted two solutions to the same question?

If you want to update your first solution, click the green "Improve solution" link and edit your solution.
Azza ALbelushi 10-Oct-18 2:46am    
i apply what summiya1 suggest.. but lot of white spaces appear till the footer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900