Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
djnro
Commits
48f24114
Commit
48f24114
authored
Nov 18, 2015
by
Zenon Mousmoulas
Browse files
(Re-)add sticky footer using display:table/table-footer-group
parent
5a05b68b
Changes
3
Hide whitespace changes
Inline
Side-by-side
djnro/templates/base.html
View file @
48f24114
...
...
@@ -17,7 +17,6 @@
{% block extrahead %}{% endblock %}
</head>
<body
class=
"{% block bodyclass %}{% endblock%}"
>
<div
id=
"wrap"
>
{% block header %}
<div
class=
"push-top"
></div>
<nav
class=
"navbar navbar-default navbar-fixed-top"
>
...
...
@@ -78,14 +77,15 @@
</nav>
{% endblock %}
<div
class=
"stickyfooter-container"
>
{% block content %}
<div
class=
"container"
>
{% block subcontent %}
{% endblock %}
</div>
{% endblock %}
</div>
{% include "partial/footer.html" %}
{% include "partial/footer.html" %}
</div>
<script
type=
"text/javascript"
src=
"https://code.jquery.com/jquery-2.1.4.min.js"
></script>
<script
type=
"text/javascript"
src=
"{% static 'js/script.js' %}"
></script>
<script
type=
"text/javascript"
src=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"
></script>
...
...
djnro/templates/partial/footer.html
View file @
48f24114
{% load i18n %}
<footer
{%
if
user.is_authenticated
%}
class=
"auth"
{%
endif
%}
>
<div
class=
""
>
<footer
class=
"stickyfooter"
>
<div>
<div
class=
"container"
>
{% if user.is_authenticated %}
{% trans "If you have any questions or need help, contact" %} {{ BRANDING.helpdesk.name }} (
<a
href=
"{{ BRANDING.helpdesk.uri}}"
>
{{BRANDING.helpdesk.uri}}
</a>
) - {{BRANDING.helpdesk.phone}}
</br>
...
...
static/css/style.css
View file @
48f24114
...
...
@@ -6,20 +6,38 @@ a.navbar-brand img {
height
:
100%
;
}
/* sticky footer begin */
html
,
body
{
height
:
100%
;
}
body
{
margin
:
0
;
padding
:
0
;
overflow-y
:
scroll
;
}
.stickyfooter-container
{
display
:
table
;
height
:
100%
;
width
:
100%
;
-moz-box-sizing
:
border-box
;
-webkit-box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
footer
.stickyfooter
{
display
:
table-footer-group
;
height
:
1px
;
}
/* sticky footer end */
footer
{
text-align
:
center
;
background
:
#eee
;
}
footer
>
div
{
padding
:
25px
;
background
:
#eee
;
left
:
0
;
right
:
0
;
}
.pac-container
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment