how to delete margin-top: 32px !important from twenty twelve

前端 未结 12 1033
情深已故
情深已故 2021-01-31 20:52

I want to remove the margin-top property from twenty twelve theme. This is the default theme provided by wordpress. The sample of the code what I found with the help of firebug.

12条回答
  •  醉梦人生
    2021-01-31 21:14

    A better way to do this is to add theme support for the admin bar with a callback of "return false", then Wordpress wont ever trigger the _admin_bar_bump_cb action which is responsible for adding in the margin-top:32px.

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

提交回复
热议问题