::before at top of themes after admin bar removal – how to remove it?
-
Hello,
I’ve looked for a solution, but it’s hard to search for that CSS selector with other keywords due to the colon.
Pictured: https://prnt.sc/j2bvqn
I used the following filter in functions.php
add_filter('show_admin_bar', '__return_false');
The admin toolbar doesn’t load, but a CSS :before is creating a gap at the beginning of the page about 22px high. Inspect Element isn’t giving me any clues and can’t find it in the CSS or override it in my child theme. This isn’t a new feature, I’ve just always patched it up with something like `margin-top: -22px;
z-index: 99;` in the next div in the file. That probably isn’t best practice though since not all screens have the same resolution.If someone could point me to the CSS governing this selector or what in WordPress is rendering it, I’d be most grateful.
Theme: Child Theme of TwentySixteen
- The topic ‘::before at top of themes after admin bar removal – how to remove it?’ is closed to new replies.