tags:

views:

1486

answers:

1

I have a Coda slider on one webpage (hand-crafted, not using the plugin, but that's irrelevant) and the outer div has a border-radius.

A bunch of inner divs have background colors, but they stick out on top of the corners when I want them to be BEHIND the rounded corner.

Is there any way to achieve this?

+3  A: 

I found that WebKit would crop everything if I put overflow: hidden on the element, but Gecko wouldn't (see my blog post for code and screenshots). The best I could do in Gecko was either put a border radius in the inner div too, or add a margin/padding to the wrapper div so that the inner divs sat below the corners.

robertc
So this is the only way then?
Brandon Wang
I suspect Gecko really ought to respect the overflow: hidden, but it's not fully implemented yet. It's hard to say either way until the spec is finalised though.
robertc
I asked a question on the MDC wiki and Jürgen Jeka pointed me at the defect: https://bugzilla.mozilla.org/show_bug.cgi?id=459144
robertc
Found a way to get rounded corners in Firefox using SVG clipping: http://www.boogdesign.com/b2evo/index.php/2009/09/02/firefox-img-rounded-corners-svg?blog=2 Tested on image elements, ought to work for any content.
robertc