• 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

Hide iframe and replace with hyperlinked picture dependent on @media

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 › Hide iframe and replace with hyperlinked picture dependent on @media

This topic is: resolved
  • This topic has 2 replies, 2 voices, and was last updated 11 years, 2 months ago by brianrfrench.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • February 21, 2015 at 1:09 pm #141669
    brianrfrench
    Member

    Hi all,

    The page I'm working on is here http://www.crosstalkglobal.org/become-sponsor using the Minimum Pro Theme. I'm having issues similar to this post: http://www.studiopress.community/topic/responsive-iframe/

    Rather than continue to fight with the iframe properly resizing on iphones and ipads (not sure about android or amazon fire devices), I'd like to hide it depending on the screen size. I've set up a div class called .donation-container on the page. Here is the css for the iframe:

    /* Donation Container so clover donations hides on smaller screens and is replaced with a donate button */
    
    .donation-container {
        position: relative;
        padding-bottom: 56.25%;
        height: 0;
        /* overflow: hidden; */
        max-width: 100%;
    }
    
    .donation-container iframe, .donation-container object, .donation-container embed {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    Here's the website page text:

    The need for effective biblical communicators has never been more urgent, your partnership has never been more important.  Join us!
    <div class="donation-container-mobile"><a href="https://crosstalkglobal.cloverdonations.com/3/"><img class=" aligncenter" style="border: none;" src="https://s3.amazonaws.com/sharedassets.cloverdonations.com/share-form/give-green-big.png" alt="" width="125" height="39" /></a></div>
    
    <div class="donation-container"><iframe style="border: 0;" src="https://crosstalkglobal.cloverdonations.com/1/" width="300" height="150"></iframe></div>

    How can I add the div donation-container-mobile to hide when above a certain size and show below a certain screen size, and vise-versa for the div donation-container? Should I add display: block and hide to the css in @media settings area, the .donation-container area (etc), or do something else?

    Thanks for the help!

    http://www.crosstalkglobal.org/become-sponsor
    May 7, 2015 at 7:43 pm #150825
    Susan
    Moderator

    As you posted this a while ago, I hope you were able to get your issue resolved. If it is resolved, please mark this thread as “resolved”, so it can be closed.

    If you are still having issues, report back here, and I will try to escalate.

    May 7, 2015 at 8:56 pm #150840
    brianrfrench
    Member

    Thanks, will do!

  • 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