Sticky footer appears in edit mode but hides behind elements when viewing normally?
Permalink
Hi guys,
I'm sure this is ridiculously simple, but its driving me wild! I have a site which is built with divs that uses the sticky footer, a footer I've used before with no issue.. but when i view the site in edit mode i can see the footer underneath the body container, when i view the page the footer is sitting behind the slider (above the body container div!?
My full.php template looks like this:
and the css looks like this:
my footer.php looks like this
anyone got any ideas on how to make the div sit nicely under the bodycontainer
thanks for looking!
I'm sure this is ridiculously simple, but its driving me wild! I have a site which is built with divs that uses the sticky footer, a footer I've used before with no issue.. but when i view the site in edit mode i can see the footer underneath the body container, when i view the page the footer is sitting behind the slider (above the body container div!?
My full.php template looks like this:
<?php defined('C5_EXECUTE') or die("Access Denied."); $this->inc('elements/header.php'); ?> <div class="slider"><?php $a = new Area('HeaderImages'); $a->display($c);?></div> <div class="bodycontainer"> <?php $a = new Area('Main'); $a->display($c);?> </div> <div> </div> <?php $this->inc('elements/footer.php'); ?>
and the css looks like this:
html { height:100%!important; margin:0px; padding:0px; background-color:#000; } body { height:100%!important; margin:0px; padding:0px; } .wrapper { min-height: 100%; height: auto !important; height: 100%;
Viewing 15 lines of 85 lines. View entire code block.
my footer.php looks like this
<?php defined('C5_EXECUTE') or die("Access Denied."); ?> </div> <div class="push2"></div> </div> <div class="footer2"> <div class="footercontent"> <div class="footerleft"> <span class="footertext">© <?php echo date('Y')?> <a href="<?php echo DIR_REL?>/" class="footertext"><?php echo SITE?></a> content here </div> <div class="footerright"> footer right content </div> </div> </div>
Viewing 15 lines of 18 lines. View entire code block.
anyone got any ideas on how to make the div sit nicely under the bodycontainer
thanks for looking!
Thanks for your reply Jero, In edit mode it all looks OK, its when i publish the page that the footer vanishes! is this to do with the heights of elements do you think?
thanks for looking
thanks for looking
When in edit mode, you've got a cleared <div> around the areas, and a
trailing "add to area" <div> too.
You could try adding a dollop of clear:both after various areas.
You could try adding <div style="clear:both"></div> in various places,
particularly before/after the two floated footer divs.
On 03/07/2012 19:34, concrete5 Community wrote:
Could you show us the whole html generated (not the php) I think it would be easier to see what's going on
no problem guys, thanks for looking
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>About</title> <meta name="generator" content="concrete5 - 5.5.2.1" /> <script type="text/javascript"> var CCM_DISPATCHER_FILENAME = '/index.php'; var CCM_CID = 118; var CCM_EDIT_MODE = false; var CCM_ARRANGE_MODE = false; var CCM_IMAGE_PATH = "/concrete/images"; var CCM_TOOLS_PATH = "/index.php/tools/required"; var CCM_BASE_URL = "http://www.domain.co.uk";
Viewing 15 lines of 86 lines. View entire code block.
According tohttp://validator.w3.org/
you have an extra closing </div>
Maybe that's the issue?
you have an extra closing </div>
<div class="push2"></div> </div><=============
Maybe that's the issue?
thanks Jero,
removed that but no luck! still not showing the footer!
frustrating!
removed that but no luck! still not showing the footer!
frustrating!
Can't see anything obvious from looking at the code. Any chance of posting the URL, or failing that, PM me.
I used Firebug to remove teh 165px height from your .head class allowing the head to grow to its natural height, and the footer pops out at the bottom.
Looking at your html, you've got your slider and bodycontainer within the head, and they are overflowing the containing head, by a rather large amount. The footer isn't within the head, and thus is sitting just below the head.
Looking at your html, you've got your slider and bodycontainer within the head, and they are overflowing the containing head, by a rather large amount. The footer isn't within the head, and thus is sitting just below the head.
Thanks Jero, thats sorted it, thanks for your time looking at this, much appreciated!
You're welcome.
In your template try this *after* the regular css.
[code]
if ($c=>isEditMode()){ ?
<link rel="stylesheet" href="<?php echo $this->getThemePath()?>/edit/css" />
<?php } ?>
You could of course substitute a completely different css instead of overriding just the elements with height.
I've found also that if you've got any absolute or fixed position elements, you can override their positioning in the edit.css too. This is vital sometimes, if you have an area positioned on top of another.