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 720087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:43:06+00:00 2026-05-14T05:43:06+00:00

I am using CSS rounded corners for firefox and I have the following problem

  • 0

I am using CSS rounded corners for firefox and I have the following problem with content boundaries:

Code

<html>
<head>
   <style>
      #outter {
            width: 200px;
            margin: auto;
            text-align: center;
            border: 1px solid #333;
            -moz-border-radius: 15px;
        }
        #inner {
            background: red;
            opacity: 0.5;
        }
    </style>
</head>
<body>
<div id="outter">
    <div id="inner">text</div>
</div>
</body>
</html>

Effect

alt text http://img256.imageshack.us/img256/2108/testew.png

I can avoid this problem by defining -moz-border-radius for each outter’s child. There is any other way I am missing?

Edit

A harder test with multiple inner divs with different background-color for each one:

<div id="outter">
    <div id="inner1" style="background: blue">text</div>
    <div id="inner2" style="background: gray">text</div>
    ...
    <div id="innerN" style="background: yellow">text</div>
</div>
  • 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-14T05:43:07+00:00Added an answer on May 14, 2026 at 5:43 am

    You can also do this:

      #outter {
            width: 200px;
            margin: auto;
            text-align: center;
            border: 1px solid #333;
            -moz-border-radius: 15px;
            background: red;
        }
        #inner {
            opacity: 0.5;
        }
    

    Moving the background to the rounded parent will render correctly, see here for an example: http://jsfiddle.net/mE8En/ (only works in firefox!) add the webkit border radius if you want to support other webkit based browsers as well, like this:

    -moz-border-radius: 15px; 
    -webkit-border-radius: 15px;
    

    Update for edit: To handle the inner divs in firefox subtract a pixel on the inner div to compensate for the border, resulting in this:

    #outter {
        width: 200px;
        margin: auto;
        text-align: center;
        border: 1px solid #333;
        -moz-border-radius: 15px;
        -webkit-border-radius: 15px;
        background: red;
    }
    #outter > div:first-child {
        -moz-border-radius-topleft: 14px;
        -moz-border-radius-topright: 14px;
         -webkit-border-top-left-radius: 14px;
         -webkit-border-top-right-radius: 14px;
    }
    #outter > div:last-child {
        -moz-border-radius-bottomleft: 14px;
        -moz-border-radius-bottomright: 14px;
         -webkit-border-bottom-left-radius: 14px;
         -webkit-border-bottom-right-radius: 14px;
    }
    #inner {
        opacity: 0.5;
    }
    ​
    

    Note: the radii aren’t perfect on the inner divs in webkit, adjust as desired…this is because the rendering isn’t pixel perfect between browsers.

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

Sidebar

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.