Fixed Top Navbar
Permalink 1 user found helpful
Does anyone know how to over ride my css for a top fixed nav bar. I am having an issue when I go to edit. It will mask the c5 toolbar.
Basically, when the user is logged in I want the bar to have margin top 42px.
Any ideas? I am a PHP noob. So any help would be appreciated.
Thanks in advance.
Basically, when the user is logged in I want the bar to have margin top 42px.
Any ideas? I am a PHP noob. So any help would be appreciated.
Thanks in advance.
That would be good if I needed it for editing. What about being logged in ?
The toolbar shows up when the current user has permission to edit something on the page so you really want to check if they have editing permission and then add some space. Try this...
Also, I think the spacing needs to be 49px high if I'm not mistaken.
<?php $pageObject = Page::getCurrentPage(); $po = new Permissions($pageObject); if ($po->canWrite()){?> <div style="width:100%;height:49px;display:block;clear:both"></div> <?php }?>
Also, I think the spacing needs to be 49px high if I'm not mistaken.
Perfect! Thanks.
I use UIKIT-Framework with Concrete5 and i apply a fixed navbar with javascript. So i just use the z-index to fix the concrete navbar overlay!
Works perfect and is easy.
May someone could use this.
Have a nice day.
Works perfect and is easy.
<?php $c = Page::getCurrentPage(); $cp = new Permissions($c); if (is_object($cp) && ($cp->canWrite() || $cp->canAddSubContent() || $cp->canAdminPage())) { ?> <style type="text/css"> .uk-navbar {z-index: 999;} </style> <?php } ?>
May someone could use this.
Have a nice day.
If there are editable areas near the top of the page, does a z-index solution make it impossible to edit these areas because they are under the c5 toolbar?
Please add tags: uikit , uikit Sticky navigation, Sticky navigation
(For future searches about this issue - this is usefull post for uiKit users)
(For future searches about this issue - this is usefull post for uiKit users)
You can use this