• Resolved lukefive

    (@lukefive)


    The Hero/background image on our splash page is suddenly too big.
    Using Chrome development tools, I tracked down the CSS where the problem apparently started. We tried using background-size: cover; but that caused correct width combined with too much height. So now I’m digging out tech tips on preserving aspect ratio.

    Any tips on best practice here?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @lukefive

    Could you try disabling all your plugins, switch to the OnePress theme (currently you are using the child theme) and see if this fixes the issue? You’ll need to clear all your caches after disabling your plugins.

    If it does fix the issue, then try re-enabling your plugins one by one until the issue comes back. This procedure will help diagnose which plugin is causing the issue.

    Let me know!

    Thread Starter lukefive

    (@lukefive)

    @longnguyen I will do that today.
    I was so focused on analyzing in the Chrome web dev tools, I did not do that plugin step.

    Thread Starter lukefive

    (@lukefive)

    Disabling all the plugin did not make any difference.

    After hours of messing with CSS, I can’t figure what part of the theme is making the image be either 1519px wide (inline CSS from who knows where?) or sometimes 1280px wide (grayed out in dev tools, so I can’t find source).

    Just for laughs I replaced the image itself with another version 1920px wide, and scale it DOWN instead of up. Now it works. But, wasted half a day on one picture.

    Thread Starter lukefive

    (@lukefive)

    More info …

    The mysterious ‘1519px’ and ‘1280px’ turn out to be viewport widths. The reason they are changing dynamically in the Chrome Dev Tools is that the CSS values do not come from CSS. There is a jQuery in OnePress that plays a big part in the splash-page background image sizing.

    @famethemes
    If I had known that, my approach to this issue would have been different.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hero/background image suddenly too big’ is closed to new replies.