Modify the WordPress admin bar CSS?

I want to remove how it adds 32px to the top of the HTML tag. It’s dumping it there with a STYLE tag right at the end with !important.

It’s damn impossible to override it, because there are no hooks or HTML and wordpress is setting it with like 5 css rules :/

Related posts

2 comments

  1. What you are seeing is probably produced by _admin_bar_bump_cb().

    From quick look at code it includes following instructions inline in WP_Admin_Bar class:

    To remove the default padding styles from WordPress for the Toolbar, use the following code:

    add_theme_support( 'admin-bar', array( 'callback' => '__return_false' ) );

Comments are closed.