Adjusts to fixed header when admin bar is on

This commit is contained in:
mateuswetah 2021-04-22 17:18:35 -03:00
parent c327e8fabe
commit 22e8a530d5
1 changed files with 12 additions and 1 deletions

View File

@ -2759,7 +2759,18 @@ function tainacan_header_settings_style_output() {
.tainacan-logo .logo {
max-height: ' . $header_logo_max_height . 'px !important;
max-width: ' . $header_logo_max_width . 'px !important;
}' . ( $is_fixed_header ? 'nav.navbar { position: sticky; top: 0; z-index: 9999; }' : '');
}' . ( $is_fixed_header ?
'body nav.navbar {
position: sticky;
z-index: 9999;
}
body:not(.admin-bar) nav.navbar {
top: 0;
}
body.admin-bar nav.navbar {
top: 32px;
}'
: '');
echo '<style type="text/css" id="tainacan-style-header-custom">' . $css . '</style>';
}