Skip to content

Commit f652041

Browse files
authored
Merge pull request #33 from SADiLaR/feature/fix_footer_at_bottom
Fix footer to bottom of web page
2 parents 4a03c1d + f687096 commit f652041

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

app/static/css/styles.css

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,24 @@
1111

1212
/*General*/
1313
body {
14-
margin: 0;
1514
padding: 0;
15+
margin-bottom: 60px;
16+
}
17+
18+
html {
19+
position: relative;
20+
min-height: 100%;
21+
padding-bottom: 60px;
22+
}
23+
24+
.footer {
25+
color: white;
26+
background: var(--primary);
27+
width: 100%;
28+
29+
position: absolute;
30+
height: 60px;
31+
bottom: 0;
1632
}
1733

1834
.header-container {
@@ -81,12 +97,6 @@ body {
8197
color: var(--primary);
8298
}
8399

84-
.footer {
85-
color: white;
86-
background: var(--primary);
87-
width: 100%;
88-
}
89-
90100
.footer > a {
91101
color: var(--primary-fg);
92102
}

app/templates/base.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<link rel="stylesheet" href="{% static 'css/styles.css' %}">
1515
</head>
1616

17-
<body class="d-flex flex-column min-vh-100">
17+
<body>
1818
<!--header-->
1919
{% block app_header %}
2020
<header>
@@ -52,7 +52,7 @@
5252
</div>
5353
<br>
5454
<!-- app footer -->
55-
<footer class="footer my-5 mt-auto">
55+
<footer class="footer">
5656
<div class="text-center p-3">
5757
Developed by <a class="text-white" href="https://sadilar.org">SADiLaR</a>
5858
</div>

0 commit comments

Comments
 (0)