How do you accommodate a fixed navigation bar in Concrete?
PermalinkI was hoping someone had come across this problem before, and figured out a PHP solution to moving the design down or changing the CSS.
With z-index I sometimes change it in edit mode:
<?php $c = Page::getCurrentPage(); $cp = new Permissions($c); if (is_object($cp) && ($cp->canWrite() || $cp->canAddSubContent() || $cp->canAdminPage())) { ?> <style type="text/css"> nav{z-index:0} </style> <?php } ?>
Or maybe:
<?php $c = Page::getCurrentPage(); $cp = new Permissions($c); if (is_object($cp) && ($cp->canWrite() || $cp->canAddSubContent() || $cp->canAdminPage())) { ?> <style type="text/css"> nav{position:relative} </style> <?php } ?>
Or even:
<?php $c = Page::getCurrentPage(); $cp = new Permissions($c); if (is_object($cp) && ($cp->canWrite() || $cp->canAddSubContent() || $cp->canAdminPage())) { ?> <style type="text/css"> nav{top:49px} </style> <?php } ?>
But taking out the specification for "top: 0" did the trick. Thanks.
...You did say php solution
Kalinihta
BTW: where would I put that snippet?
Put the snippet in header.php, maybe just before closing head tag.
Which version of C5 are you using?
Up to 5.6.0.2 page was moved down with body tag
5.6.1 uses html
So easiest option would be to update C5 and have a fixed bar, not absolute.