• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

unwanted inline styles from Infinity Pro

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › unwanted inline styles from Infinity Pro

This topic is: not resolved

Tagged: Infinity Pro, inline styles, unwanted space

  • This topic has 2 replies, 2 voices, and was last updated 8 years, 2 months ago by canpress5.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • April 18, 2018 at 11:50 am #219080
    canpress5
    Member

    I am working with Infinity Pro but this may also be an issue with other themes.

    The theme is adding unwanted space at the top of the blog post page and category page, below the header.
    You can see this on the demo blog post and category page:

    The Art of Being Creative


    https://demo.studiopress.com/infinity/journal/

    Looking at the source, this is due to inline styles as follows:

    <div class="site-inner" style="margin-top: 72px;">

    The same thing is happening on my site except it shows different values for the margin-top, and different again (larger) for mobile.

    Where does this inline style come from, and why?

    I can override it using
    .site-inner {margin-top: 0px !important;}
    in style.css but is there a better method?

    Thank you for any advice you can give.

    https://demo.studiopress.com/infinity/creative/
    April 18, 2018 at 1:00 pm #219083
    Victor Font
    Moderator

    The margin-top is calculated on page load in global.js. Infinity Pro has a fixed header. If you don't have a top margin on site-inner, it will be underneath the header. Since it's impossible for any developer to anticipate how tall a header will be after a user adds their own content, that's why the calculation. If you remove the jQuery, you'll have to add atop margin in style.css otherwise your site will appear to be broken.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    April 19, 2018 at 4:16 pm #219126
    canpress5
    Member

    Thank you for the reply Victor!

    So it looks like the jQuery calculation is inaccurate in some cases, which still means needing to override it in style.css.
    I think it would be easier to deal with the margin-top value solely in style.css rather than having the added confusion of inline styles in the mix.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble