WordPress.org

Ready to get started?Download WordPress

Forums

The Bootstrap
[resolved] Additional generated style in head introduces margin in body > .container (2 posts)

  1. stayfq
    Member
    Posted 1 year ago #

    Hi,

    I'm trying to find where the style introduced directly after the-bootstrap.css and style.css are loaded comes from so I can eliminate it.

    Here is the code in question that sits in the document HEAD:

    <style type="text/css">
    body > .container{margin-top:68px;}@media(min-width: 980px){body > .container{margin-top:58px;}}.navbar.navbar-fixed-top{margin-top:28px;}
    </style>

    http://wordpress.org/extend/themes/the-bootstrap/

  2. jmjf
    Member
    Posted 1 year ago #

    I found it in functions.php in the_bootstrap_print_styles().

    Note that, if you have a floating top navbar (which you do if this is in your HTML) and don't have an override in your child theme's styles.css, this will cause the top edge of the main content area to float up under the navbar, which might hide part of any header.

    If you just want to eliminate the space between the top of the content area and the navbar, you'll need to adjust the margin values. FWIW, I did that in my child theme's styles.css with values 51 and 41.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic