Menu bar covers page in c5.5

Permalink
see attachments. Same theme in 4.2.1 and 5.5. In 5.5 the menu bar covers the top of the page, in 4.2.1 not. What's the reason and what can I do? I have a page type with areas right on the top of the page and I can't edit them...

2 Attachments

cgrauer
 
VidalThemes replied on at Permalink Reply
VidalThemes
Hi there, the edit bar in 5.5 is implemented in a different way in 5.5, it uses fixed positioning, so its taken out of document flow, this causes it to overlap the top of the site, if you use the following code directly underneath your opening body tag, this should sort it out for you:

<?php  global $u;
$u = new User();
if (($u->isRegistered()) || $c->isEditMode()) { ?>
<div style="min-height: 50px;"></div>
<?php } ?>
BHWW replied on at Permalink Best Answer Reply
BHWW
Hi Vidall

This works ok, but now if there is a background image on the body this no longer moves down with the edit bar, so the page looks a bit odd.

C5 Team... Is there going to be a fix for this in 5.5.1??

Thanks

B

PS is anyone is having the same issue as me, i've added this to the header as a temporary fix:

<?php  global $u;
$u = new User();
if (($u->isRegistered()) || $c->isEditMode()) { ?>
<style>
body
{
   margin-top: 50px;
   background: #fff url(<?=$this->getThemePath()?>/images/background.png) repeat-x 0 50px;
}
</style>
<?php } ?>
VidalThemes replied on at Permalink Reply
VidalThemes
Hi in2orbit

I always work with an entire page wrap just inside the body, so I can give it an individual class or id so i can prefix all my css with it to stop it interfering with concrete5 base styles, so I usually apply an image that would ordinarily go on the body, onto the page wrapper, thats why I use the solution I offered. But of course your solution works real well too.

Regards
funnypurple replied on at Permalink Reply
funnypurple
Thanks OnsiteDesigner!

That solved my problem. I use horizontal navigation in a couple of themes /sites. The other solutions didn't work, because in css top-margin of header is defined 0px, so it doesn´t matter if php script adds a div up there.

For me hiding navigation isn´t an issue, but a regular customer who has to update the site it is (most of them avoid using Dashboard or Full Sitemap eg.)

I edited your code for my purpose and it works great.

<?php  global $u;
$u = new User();
if (($u->isRegistered()) || $c->isEditMode()) { ?>
<style>
#header
{
   margin-top: 50px;
}
</style>
<?php } ?>
funnypurple replied on at Permalink Reply
funnypurple
Thanks OnsiteDesigner!

That was the solution I´ve been searching for.
I have header div margin-top 0px, so I just edited your code to my purpose, and now it works!

<?php  global $u;
$u = new User();
if (($u->isRegistered()) || $c->isEditMode()) { ?>
<style>
#header
{
   margin-top: 50px;
}
</style>
<?php } ?>