Content hidden by Edit Bar
Permalink 2 users found helpful
Hi,
I have a navigation bar which is absolutely positioned at the top of the browser window but unfortunately when I'm logged in the C5 edit bar covers my navigation bar.
I know what I want to do:
Place a bit of php code in the containing div for the navigation bar which if the user is logged in adds a class to this containing div (class="loggedin") for instance, then in the stylesheet I can style this class to move the bar away from the top of the window by the depth of the C5 edit bar.
What I need is the bit of code which will perform this check and add the class definition.
I hope someone can help me resolve this.
Many thanks in advance,
Tony.
I have a navigation bar which is absolutely positioned at the top of the browser window but unfortunately when I'm logged in the C5 edit bar covers my navigation bar.
I know what I want to do:
Place a bit of php code in the containing div for the navigation bar which if the user is logged in adds a class to this containing div (class="loggedin") for instance, then in the stylesheet I can style this class to move the bar away from the top of the window by the depth of the C5 edit bar.
What I need is the bit of code which will perform this check and add the class definition.
I hope someone can help me resolve this.
Many thanks in advance,
Tony.
This is how I have my <body> tag on every C5 site I build:
This way, I can target a certain template, if someone is logged in and/or if the page is in edit mode with simple CSS rules.
If your navigation bar has an id of "nav-bar" then in your main.css file:
#nav-bar{
// normal CSS rules here
}
.loggedIn #nav-bar{
// CSS rules to move the navbar
}
This way, I can target a certain template, if someone is logged in and/or if the page is in edit mode with simple CSS rules.
If your navigation bar has an id of "nav-bar" then in your main.css file:
#nav-bar{
// normal CSS rules here
}
.loggedIn #nav-bar{
// CSS rules to move the navbar
}
Many thanks and sorry for the delay in my reply.
That worked a treat. I'll have to remember that useful bit of code :)
Thanks again,
Tony.
That worked a treat. I'll have to remember that useful bit of code :)
Thanks again,
Tony.
No problem - glad it worked out :)
hi
i have a similar problem, i just have to modify the way the footer is positioned in edit mode.
i have tryed this code and works for all content ares except for footer and header... does it could work with those elements?
i have a similar problem, i just have to modify the way the footer is positioned in edit mode.
i have tryed this code and works for all content ares except for footer and header... does it could work with those elements?