• 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

scaling front page background image in 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 › scaling front page background image in Infinity Pro

This topic is: not resolved

Tagged: background image, background-size, Infinity Pro

  • This topic has 1 reply, 2 voices, and was last updated 4 years, 8 months ago by Brad Dalton.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • May 7, 2018 at 4:43 pm #219619
    canpress5
    Member

    Has anyone tried to scale the main background image in section front-page-1 of the Infinity Pro theme for narrower screen widths?
    The default behavior is that the image width is 'cropped' for narrower screen widths, but what if you want to show the whole (uncropped) image scaled for all screen widths?
    Here is the default height:

    .front-page-1 {
        height: 100vh;
    }

    if you change it to

    .front-page-1 {
        height: auto;
    }

    the image is cropped top and bottom, so then you need to add padding to show the whole image, eg

    .front-page-1 {
        height: auto;
        padding-top: 350px;
         padding-bottom: 350px;
    }

    this shows the whole image but the image does not scale down at narrower widths due to the padding. You could reduce the padding using media queries which is the default behavior in Infinity Pro for max-width: 800px, but this is not ideal if you need the whole width & height of the image to be shown for all screen widths.
    Is there a way to have the background image scale down properly at narrower screen widths?

    https://demo.studiopress.com/infinity/
    May 19, 2018 at 2:09 pm #220086
    Brad Dalton
    Participant

    This is the problem located in the front page styles :

    .front-page-1 {
    	 background-size: cover;
    }
    

    If you change the value to auto and wrap it in a media query, it scales down based on my testing. https://www.w3schools.com/cssref/css3_pr_background-size.asp

    You need to write the custom CSS to override the default CSS


    Get Help – Book Consultation.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 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

© 2023 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