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 can remove this margin by setting the top and left margin to zero. Like the padding and border, the sizes of specific sides of the margin can be set using margin-left , margin-right , margin-top , and margin-bottom .
If you want to disable the top and bottom margin for the entire website, go to the General Options > General Settings section of the Customizer (Appearance > Customize) and add 0 as Top and Bottom in the Content Padding field.
Syntax. The margin-top property is specified as the keyword auto , or a <length> , or a <percentage> . Its value can be positive, zero, or negative.
"Margin is that space between the edge of an element's box and the edge of the complete box, such as the margin of a letter. 'top' displaces the element's margin edge from the containing blocks box, such as that same piece of paper inside a cardboard box, but it is not up against the edge of the container."
function remove_admin_login_header() {
remove_action('wp_head', '_admin_bar_bump_cb');
}
add_action('get_header', 'remove_admin_login_header');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With