Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6876063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:25:53+00:00 2026-05-27T04:25:53+00:00

I have an iframe inside a div tag with Overflow:Hidden and a Border-Radius of

  • 0

I have an iframe inside a div tag with Overflow:Hidden and a Border-Radius of 50px all around making it a circle. The iframe source is an .aspx page with a button. When the button is clicked it causes post back. On post back I have it change background color from nothing to something.

iframeBody.Attributes.Add("Style", "background-color:#FF9090");

It works perfectly in Firefox and Internet Explorer (Fine in IE!? Surprising!) But in Chrome it seems to overflow the background color forming a square. (All other content displays perfectly, it’s just the background seeping out.) Any help would be appreciated. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:25:53+00:00Added an answer on May 27, 2026 at 4:25 am

    The square you’re seeing in your sample is the iframe border. You can easily remove that with styles:

    iframe {
        border: 0;
    }
    

    The content of the iframe apparently overflows the containing div, when the div has position: absolute (or relative, for that matter). I’m not quite sure why that would be the case, but you could always work around that by wrapping that div in a container that contains only the div and the iframe, and move the positioning to that element:

    <div id="outer">
        <div>
            <iframe></iframe>
        </div>
    </div>
    
    #outer {
        position: absolute;
        width: 100px;
        height: 100px;
    }
    
    #outer > div {
        border-radius: 50px;
        height: 100px;
        width: 100px;
        overflow: hidden;
        border: 5px solid #D3D3D3;
    }
    
    iframe {
        border: 0;
        background-color: pink;
        height: 100%;
        overflow: hidden;
        width: 100%;
    }
    

    Having taken care of this, you’ll notice that the iframe overlaps part of the border. This is the same behaviour you’d see in chrome if you were to just remove the position: absolute.

    Now that you do have a wrapper, however, it is a small fix to also move the border to that wrapper, which will take care of that problem as well, and give you a nice circle border, that’ll look the same across all modern browsers.

    Note that you want to keep the border-radius property on both divs, but move the border property to #outer. Now, since the wrapper has a border, and its child does not, the wrapper will be slightly larger, so for a smooth circle, it’ll also need a slightly greater border radius:

    #outer {
        position: absolute;
        width: 100px;
        height: 100px;
        border: 5px solid #D3D3D3;
        border-radius: 55px;
    }
    
    #outer > div {
        border-radius: 50px;
        height: 100px;
        width: 100px;
        overflow: hidden;
    }
    
    iframe {
        border: 0;
        background-color: pink;
        height: 100%;
        overflow: hidden;
        width: 100%;
    }
    

    Working demo

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What a mouthful. Basically I have a parent <div> and inside that an <iframe>
I have a div that is contain inside an iframe from a external html
I have an XBAP that is in an IFRAME, wrap inside a DIV, which
Good day to all. I have this structure <html> <iframe> <div id=idd>Some Content</div> </iframe>
I have parent page index.php and inside it i have iframe like below <div
I have an iframe with a class name=blaclass. Inside it, I have one div
I have a iframe containing div to be shown later that is initially hidden
I have a page being loaded in an <iframe> . Inside the <iframe> ,
I have an iframe in a tab with a hidden element, and I want
I am using the fb:serverfbml tag to render a multi-friend-selector inside an IFrame. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.