html - Maintaining a footer strip of background with CSS -
our design team has come concept uses full background image on landing page, has image on footer of remaining pages, main content being on white background.
so, quick mock illustrate concept, landing page might be:
while majority of site be:
this presents problem because don't know window size it's being displayed in, keep footer strip consistent across pages presumably have use whole-page background image , block of out in white.
i struggling in css (i'm back-end developer that's been roped in ). adopted following pattern sticky footer:
html{ height: 100%; margin: 0; } body { background-image: url("istock-507452790.jpg"); margin: 0; padding: 0; background-size: 100%; height: 100%; } .wrapper { min-height: 100%; background-color: white; margin-bottom: -50px; } .footer, .push { height: 50px; } <body> <div class="wrapper"> content! <div class="push"></div> </div> <footer class="footer"> footer! </footer> </body> but leads whole page being filled background colour specified on wrapper.
is there way white on of page , keep strip @ bottom? not averse using other sticky footer methods if necessary.
i have changed dom little. hope helps.
also can remove footer text if dont need it.
html, body { margin: 0; padding: 0; } body { background-image: url('http://www.lavitaoggi.com/wp-content/uploads/2014/02/8e69oceano-acqua-bolle-aria-ossigeno.jpg'); } .wrapper { min-height: 90vh; background-color: white; } .footer { height: 10vh; color: #fff; } <div class="wrapper"> content! loream </div> <footer class="footer"> footer!s </footer> 

Comments
Post a Comment