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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:31:47+00:00 2026-05-29T07:31:47+00:00

I have a long rectangle shape container with a radius. And I also have

  • 0

I have a long rectangle shape container with a radius.

And I also have 3 child divs, in the container.

Here it is:

normal

As you can see in the picture above, the first child container (white) and the third (red) have also been set a radius to match to containers radius.

Now, the child containers width will be dynamic (changeable by the user). So the user will be able to change the widths of all three child containers to meet their needs.

But take a look at what happens when I give the third container a width of 2%:

with 2% width

the same thing happens when i do the same to the first child (it overlaps the containers rounded borders).

Child container 1 (white) is floating to the left and child container 3 (red) is floating to the right.

I need a way to stop the overlapping from happening.

I am able to use JS and JQuery incase your wondering.

Thanks

EDIT:
CSS:

.parent {
    border: 1px solid #5B5B5B;
    height: 30px;
    width: 80%;
    right: 0%;
    position: relative;
    margin-right: auto;
    margin-left: auto;
    <? set_radius("25px",true);
    set_box_shadow("1px","1px","#F8F8F8");?>    
    overflow: hidden;
    z-index: 3;
}
    .child_class {
        display: inline-block;
        position: relative;
        width: auto;
        height: 100%;
        margin: 0px;
        border-right-width: 1px;
        border-right-style: solid;
        border-right-color: #5C5C5C;
        box-sizing: border-box;
    }

    #child1 {
        width: 33.33;
        background-repeat: repeat-x;
        background-position: center center;
        <? set_radius("25px",false,false,true,false,true);?>
        float: left;
        background-color: #fff;
    }
    #child2 {
        width: 33.33;
        background-repeat: repeat-x;
        background-position: center center;
        background-color: #0CF;
    }

    #child3 {
        <? set_radius("25px",false,true,false,true,false);?>
        background-repeat: repeat-x;
        background-position: center center;
        width: 33.33;
        float: right;
        background-color: #F00;
    }

HTML:

<div class="parent">
          <div class="child_calss" id="child1"></div><div class="child_calss" id="child2"></div><div class="child_calss" id="child3"></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-29T07:31:48+00:00Added an answer on May 29, 2026 at 7:31 am

    In your CSS:

    parent{
        overflow: hidden;
    }
    

    Then you won’t have to bother with matching the border-radius on the children, either.

    Edit

    I’ve created this jsfiddle to demonstrate:

    1. Not needing border-radius on the children
    2. overflow: hidden rounds the children when they overlap
    3. Unnecessary background- properties on the children are removed
    4. Expected behavior at small percentages

    Update

    Another note on this:
    If you want the CSS/HTML to perform logic for you (not drop the last element out of the bar), you have a clear misunderstanding of what CSS and HTML do.

    I’ve updated the jsfiddle to provide a sort of patch-fix to that issue. The third child is positioned absolutely at the far right, so that it will always stay in the bar.

    Update

    Finally, here’s the bug in Webkit that doesn’t correctly clip the background. It appears there’s nothing you can do right now except possibly something like this:

    <div class="hasBorder hasBorderRadius">
        <div class="hasBorderRadius hasHiddenOverflow">
            <div class="containsContent">
            </div>
        </div>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First post, but long time browser :) So here's my problem: Basically I have
I have long since forgotten the password for the root user on one of
I have long been wondering why lazy evaluation is useful. I have yet to
I have long tables generated by datagrid control that go beyond the page width.
I have long recognized that any set of whitespace in an HTML file will
I have long been of the opinion that the time and resources it would
I have long HTTP request ( generating large Excel file - about 60K records
I have long file with the following list: /drivers/isdn/hardware/eicon/message.c//add_b1() /drivers/media/video/saa7134/saa7134-dvb.c//dvb_init() /sound/pci/ac97/ac97_codec.c//snd_ac97_mixer_build() /drivers/s390/char/tape_34xx.c//tape_34xx_unit_check() (PROBLEM)/drivers/video/sis/init301.c//SiS_GetCRT2Data301() /drivers/scsi/sg.c//sg_ioctl()
I wish to have long and short forms of command line options invoked using
One thing with which I have long had problems, within the CakePHP framework, is

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.