[damned-lies] Make footer stick to the bottom of a page
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Make footer stick to the bottom of a page
- Date: Sat, 18 Feb 2017 10:28:16 +0000 (UTC)
commit 983b8bf0207795b1a338dbb55334034633a7a222
Author: Tom Tryfonidis <tomtryf gnome org>
Date: Tue Feb 14 14:42:09 2017 +0200
Make footer stick to the bottom of a page
common/static/css/template.css | 20 ++++++++++++++++++++
templates/base.html | 6 ++----
2 files changed, 22 insertions(+), 4 deletions(-)
---
diff --git a/common/static/css/template.css b/common/static/css/template.css
index 976fc34..56cd1ee 100644
--- a/common/static/css/template.css
+++ b/common/static/css/template.css
@@ -838,3 +838,23 @@ ul.foot li {
#footer #footnotes a {
color: inherit;
}
+
+/* Sticky Footer */
+
+.gnome-body {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-orient: vertical;
+ -webkit-box-direction: normal;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ min-height: 100vh;
+}
+.gnome-content {
+ -webkit-flex:1;
+ -ms-flex:1;
+ -webkit-box-flex:1;
+ flex:1;
+}
diff --git a/templates/base.html b/templates/base.html
index fd28e5e..60fa13f 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -30,7 +30,7 @@
{% block extrahead %}{% endblock %}
</head>
-<body>
+<body class="gnome-body">
<header class="gnome-header">
<div class="navbar navbar-fixed-top navbar-default affix-top">
<div class="container">
@@ -80,8 +80,7 @@
<div class="clearfix"></div>
-<div id="content">
- <div class="container">
+<div id="content" class="container gnome-content">
{% if messages %}
{% for message in messages %}
<p class="errornote">{{ message|safe }}</p>
@@ -90,7 +89,6 @@
{% block content-title %}{% endblock %}
{% block content %}{% endblock %}
- </div>
</div>
<div id="footer">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]