0

I am using the wpbootstrap theme based on bones. I noticed that my website had a white band along the top and I haven't been able to workout what was causing it however I have finally worked it out. the tag has a padding of 42px attributed. I have tried to override this within my css file but because it is loaded within wp_head() and includes !important it won't seem to work. Below is the code:

Part of header.php

wordpress head functions
    <?php wp_head(); ?>
    end of wordpress head

Loaded HTML on website:

<style type="text/css" media="screen">
html { margin-top: 32px !important; }
* html body { margin-top: 32px !important; }
@media screen and ( max-width: 782px ) {
    html { margin-top: 46px !important; }
    * html body { margin-top: 46px !important; }
}
</style>

my custom.css:

html {
margin-top: 0 !important;
}

Any help would be appreciated

1 Answer 1

0

I simply added the below code right before the closing head tag. I am not sure if this is the best way to do it but it works.

<style>
html {
margin-top: 0 !important;
}
</style>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.