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.
html{
margin-top: 32px !important;
}
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.
html{
margin-top: 32px !important;
}
You must be logged in to post a comment.
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 themargin-top:32px
.Add the following function to your functions.php file
Go to the functions file inside your theme folder:
functions.php
You can use a filter like this:
I think it is because you are logged in in your wordpress account and that 32px space corresponds to the black menu line that is on the top of your page, which doesn’t appear but leaves the space for it . Log out and refresh the page and see if it continues or open the website in an other browser.
in the style.css around line #1645 is body .site { which has padding top & bottom:
Please try it….
html.k-webkit.k-webkit78 { margin-top: 0 !important; }
In dashboard in sidebar go to Users -> Profile,then in profile uncheck “Show Toolbar when viewing site”.Update changes and margin-top will disapear.
That’s where the margin comes from.
Remove margin from h1 – h6 elements. WP have default margins and that is why you see 32px !Important in inline HTML code.
I had the same issue. I got rid of
in the header template and problem solved.
You can specify an identifier for the html tag in the template and set it to margin-top: 0! important;