From 6b4aeb2a5fc76259f8121f00bc03bfc2a742673f Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sat, 15 Aug 2015 07:08:47 +0300 Subject: [PATCH] Add a footer --- .../stylesheets/initfest/application.scss | 19 +++++++++++++++++++ .../views/layouts/public/application.html.erb | 3 +++ 2 files changed, 22 insertions(+) diff --git a/lib/initfest/assets/stylesheets/initfest/application.scss b/lib/initfest/assets/stylesheets/initfest/application.scss index 3f41adc..16c6336 100644 --- a/lib/initfest/assets/stylesheets/initfest/application.scss +++ b/lib/initfest/assets/stylesheets/initfest/application.scss @@ -6,3 +6,22 @@ @import 'initfest/flash_messages'; nav { background-image: image-url('initfest/navbg.jpg'); } + +html { + position: relative; + min-height: 100%; +} + +body { + /* Margin bottom by footer height */ + margin-bottom: 120px; +} + +footer { + position: absolute; + bottom: 0; + width: 100%; + /* Set the fixed height of the footer here */ + height: 120px; + background-color: white; +} diff --git a/lib/initfest/views/layouts/public/application.html.erb b/lib/initfest/views/layouts/public/application.html.erb index 1e4c4e7..1f26aad 100644 --- a/lib/initfest/views/layouts/public/application.html.erb +++ b/lib/initfest/views/layouts/public/application.html.erb @@ -24,5 +24,8 @@ <%= render 'public/shared/flash_messages' unless flash.empty? %> <%= yield %> +