Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Sticky bar and Admin Bar #452

Closed
brettlewis opened this issue Sep 6, 2015 · 4 comments
Closed

Sticky bar and Admin Bar #452

brettlewis opened this issue Sep 6, 2015 · 4 comments
Labels

Comments

@brettlewis
Copy link

If sticky is used on the nav bar, the admin bar overlaps it.

fix applied in _wp-admin.scss

body.admin-bar.f-topbar-fixed{
.sticky.fixed {
margin-top: 32px;
}
}

@olefredrik
Copy link
Owner

Thanks! Fixed #456

@steelwolf
Copy link

steelwolf commented Oct 11, 2017

This issue appears to be occurring again. When the sticky nav bar is set to "top" it jumps to the top of the document regardless of whether or not the admin bar is present.

Notably this occurs on scroll and not when the menu is first loaded.

@MrAndreius
Copy link

@steelwolf
I have to solve this problem myself
add $data_margin_top = (is_admin_bar_showing()) ? '2' : '0';
<div data-sticky data-margin-top="<?php echo $data_margin_top; ?>" style="width:100%" data-top-anchor="header-media:bottom" data-btm-anchor="footer-container:bottom">

just enter your anchor

@steelwolf
Copy link

Oh wow, good thought. Works perfectly, thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants