• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    External css in iframe doesn't work

    Opera for Windows
    2
    2
    736
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • baras441
      baras441 last edited by

      Description:
      I use iframe on my page with absolute path on the same domain, iframe has src like /preview?parameter=1. In iframe I use css with absolute path like /desktop.bundles/folder/file.css witch has a class for iframe body to set it margin to 0. But in inspector in developer tools body styles doesn't have css from that class. In all other browsers everything works fine, I used to use iframe attributes marginwidth and marginheight set to 0 to work around this bug. Also js in my iframe works fine and not applyed css is the only problem. Also there are no problems on network tab and ccs file has 304 status. Opening iframe src in new tab works fine like expected and the bug not reproducable all the times, sometimes iframes works fine.

      Steps to reproduce:

      1. use iframe with same origin and absolute path on the page, src like /preview?parameter=1
      2. in iframe add <link rel="stylesheet" href="/desktop.bundles/creative-preview/_creative-preview.css"> and in file write
        .b-page__body
        {
        margin:0;
        }
      3. add class .b-page__body to body
        Actual result: iframe has margins

      Expected result: iframe has 0 margins
      OS: Windows 8.1 64-bit (WoW64)

      URL: can't post my url here for now

      Version of Opera: 40.0.2308.81

      Reply Quote 0
        1 Reply Last reply
      • lando242
        lando242 last edited by

        How does it look in Chrome? Opera shares a renderer with Chrome and if it displays incorrectly there also it might shed some light on the problem.

        Reply Quote 0
          1 Reply Last reply
        • First post
          Last post

        Computer browsers

        • Opera for Windows
        • Opera for Mac
        • Opera for Linux
        • Opera beta version
        • Opera USB

        Mobile browsers

        • Opera for Android
        • Opera Mini
        • Opera Touch
        • Opera for basic phones

        • Add-ons
        • Opera account
        • Wallpapers
        • Opera Ads

        • Help & support
        • Opera blogs
        • Opera forums
        • Dev.Opera

        • Security
        • Privacy
        • Cookies Policy
        • EULA
        • Terms of Service

        • About Opera
        • Press info
        • Jobs
        • Investors
        • Become a partner
        • Contact us

        Follow Opera

        • Opera - Facebook
        • Opera - Twitter
        • Opera - YouTube
        • Opera - LinkedIn
        • Opera - Instagram

        © Opera Software 1995-