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

  • SEARCH
  • Home
  • 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 1089839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:17:03+00:00 2026-05-16T23:17:03+00:00

I have a div inside of another div. #outer and #inner . #outer has

  • 0

I have a div inside of another div. #outer and #inner. #outer has curved borders and a white background. #inner has no curved borders and a green background. #inner extends beyond the curved borders of #outer. Is there anyway to stop this?

#outer {
  display: block;
  float: right;
  margin: 0;
  width: 200px;
  background-color: white;
  overflow: hidden;
  -moz-border-radius: 10px;
  -khtml-border-radius: 10px;
  -webkit-border-radius: 10px;
  border-radius: 10px;
}

#inner {
  background-color: #209400;
  height: 10px;
  border-top: none;
}
<div id="outer">
  <div id="inner"></div>
  <!-- other stuff needs a white background -->
  <!-- bottom corners needs a white background -->
</div>

No matter how I try it still overlaps. How can I make #inner obey and fill to #outer‘s borders?

edit

The following hack served the purpose for now. But the question stands (maybe to the CSS3 and webbrowser writers): Why don’t child elements obey their parent’s curved borders and is there anyway to force them to?

The hack to get around this for my needs for now, you can assign curves to individual borders. So for my purposes, I just assigned a curve to the top two of the inner element.

#inner {
    border-top-right-radius: 10px; -moz-border-radius-topright: 10px; -webkit-border-top-right-radius: 10px;
    border-top-left-radius: 10px; -moz-border-radius-topleft: 10px; -webkit-border-top-left-radius: 10px;
}
  • 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-16T23:17:04+00:00Added an answer on May 16, 2026 at 11:17 pm

    According to the specs:

    A box’s backgrounds, but not its
    border-image, are clipped to the
    appropriate curve (as determined by
    ‘background-clip’). Other effects that
    clip to the border or padding edge
    (such as ‘overflow’ other than
    ‘visible’) also must clip to the
    curve. The content of replaced
    elements is always trimmed to the
    content edge curve.
    Also, the area
    outside the curve of the border edge
    does not accept mouse events on behalf
    of the element.

    http://www.w3.org/TR/css3-background/#the-border-radius

    This means that an overflow: hidden on #outer should work. However, this won’t work for Firefox 3.6 and below. This is fixed in Firefox 4:

    Rounded corners now clip content and images (if overflow: visible is not set).

    https://developer.mozilla.org/en/CSS/-moz-border-radius

    So you’ll still need the fix, just shorten it to:

    #outer {
      overflow: hidden;
    }
    
    #inner {
      -moz-border-radius: 10px 10px 0 0;
    }
    

    See it working here: http://jsfiddle.net/VaTAZ/3/

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

Sidebar

Related Questions

I have a problem with css. I have (parent) div and inside, another (child)
I have a container div which is centred at 50% of the page width.
I have a div class=parent . When I click on it I need to
So my questions is similar to this: crop text too long inside div What
I have a mobile template with a login form which is ajax / url
I have this form: Markup is: <table style=width: 100%; padding:5px;> <col style=width: 20%; text-align:
I have an array filled with image links and I'd like to write a
Normally I try to document the issue here well enough, and duplicate some of
Is it possible to specify where the components within a composite component will be
<body> <!-- some html code --> <script src='some.js'></script> <!-- some html code --> </body>

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.