I have a div inside another div. #outer and #inner . #outer has curved borders and a white background. #inner has no curved borders and a green background. #inner goes beyond the curved borders of #outer . 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> </div>
No matter how I try, it still overlaps. How can I make #inner obey and fill the borders of #outer ?
change
The next hacked this target. But the question is (maybe for CSS3 and webbrowser authors): Why do children not obey their parent curved borders and is there anyway to force them?
Hacking to get around this for my needs now, you can assign curves to individual borders. So for my purposes, I just assigned a curve to the two upper inner elements.
#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; }
css css3
Daniel Bingham Sep 15 '10 at 5:18 2010-09-15 05:18
source share