• I have an <iframe> inserted to my page, which is working great, but I need to remove some elements of the page with CSS.

    I have identified the post-id and identified the elements that I need to remove using the ‘Inspect’ part of Chrome.

    My Custom CSS is:

    #post-41 img, footer .newsletter_row .module {
    display: none;
    }

    Nothing is being removed?

    What have I missed?

    Thanks

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • CSS from your site will not apply within iframes. It’s not possible to hide or modify elements on a page that is iframed with CSS. It can be possible with JavaScript, but only if the iframed page is on the same domain as your site, which this is not.

    Do you have control over the site that is being iframed? If you do you could add some code to hide those elements if a certain string was added to the URL, eg ?iframe=true, then add that string to the URL you’re using to iframe.

    Thread Starter whateverbatch

    (@whateverbatch)

    Hi Jacob,

    Thanks for the reply.

    Yes, I control the site source for the iframe.

    The original page is a dynamic page. How would I arrange it to display in it’s entire form on the site, then remove all of the extra to be used in an iframe?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Iframe’ is closed to new replies.