views:

1707

answers:

3

I'm looking for a JavaScript library that can create round corners on div tags with a transparent background, such that the background colour/image of the parent element is visible at the rounded corners. For an example of rounded corners without a transparent background, have a look at the left menu on this page. Notice that the background of the parent element is not shown at the corners of the menu items.

I need this to work in IE7+ and FF3+ (ideally the other browsers too), and I'd prefer a JQuery plugin.

Does anyone have any good resources or plugins that would help?

+3  A: 

JQuery Corner?

Cherian
I tried it out and it worked beautifully in FF, but horribly in IE7
Don
@Don: looks great for me in IE6, IE7, Opera 9, Safari 4, Chrome, FF2 and FF3. In fact looks identical in all.
Crescent Fresh
Sorry it was actually IE6 that it looked horrible in, but you said you tested that one too? Did you test rounding the menu divs I referred to in the post above? If not then the difference between your test and mine may have something to do with the specific style/positioning of these elements.
Don
@Don: yes IE6 looked the same as the others. I "tested" here: http://www.atblabs.com/jquery.corners.html
Crescent Fresh
A: 

It's got a lot of limitations... but the Transparent Background Corners plugin might work in your scenario.

If you can, however, I'd suggest actually doing all the rounding server-side with CSS. It's all just divs within divs, with different padding for the corner divs. It gets rid of the huge performance hit that Safari and IE will take if you have lots of rounding to do, and allows you to have the page still look stylish for your users who don't/can't enable javascript.

Illandril
+2  A: 

I tried 2 different JQuery corner-rounding plugins. This one didn't work in either FF or IE and this one only worked in FF.

However, I found a non-JQuery library that worked perfectly in both, DD_roundies.

Don
DD_roundies worked best for me too.
Dave