Я получаю это пустое пространство ниже моего липкого нижнего колонтитула, когда на маленьких мобильных устройствах. Например, при просмотре в размере экрана iPhone SE.
Я использовал те же самые нижний колонтитул и CSS из примеров начальной загрузки, но не смог убрать пробелы.
Я думал, что это происходит из-за того, что мой текст длинный, затем я добавил высоту нижнего колонтитула с помощью медиа-запросов, но это не выглядит хорошо. Я не знаю, как это исправить. Любое руководство будет с благодарностью.
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
text
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
line-height: 60px; /* Vertically center the text there */
background-color: #0000ff
}
/* Custom page CSS
-------------------------------------------------- */
/* Not required for template or sticky footer method. */
.container {
width: auto;
max-width: 680px;
padding: 0 15px;
}
.text-muted {
color: #fff!important;
}
<!DOCTYPE html>
<!-- saved from url=(0057)https://getbootstrap.com/docs/4.0/examples/sticky-footer/ -->
<html lang="en" class="gr__getbootstrap_com"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="https://getbootstrap.com/favicon.ico">
<title>Sticky Footer Template for Bootstrap</title>
<!-- Bootstrap core CSS -->
<link href="assets/css/bootstrap.css" rel="stylesheet">
<link href="assets/css/font-awesome.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="assets/css/dashboard.css" rel="stylesheet">
<link href="assets/css/sticky-footer.css" rel="stylesheet">
</head>
<body data-gr-c-s-loaded="true">
<!-- Begin page content -->
<footer class="footer">
<div class="container">
<span class="text-muted">This is a test to check this sticky footer. This footer breaks in small screens.</span>
</div>
</footer>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="assets/js/jquery-3.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="assets/js/popper.js"></script>
<script src="assets/js/bootstrap.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="assets/js/ie10-viewport-bug-workaround.js"></script>
</body></html>