Curved corner (border-radius) cross browser
Update 18 November , 2009: The htc file is updated by Nick F. Thanks man, you got time to check it out. Now supports FF, Chrome, Safari, IE6, IE7, IE8 (Os doesn’t matter).
This version of htc files can be found here and demo here
Update 17 August, 2009: This project is moved to Google Code. Please find the htc files on http://code.google.com/p/curved-corner. Links to htc file below will not work.
Update 16 July, 2009: htc file updated with support for IE8. Thanks to Kevin for coming up with a work-around. New htc file can be downloaded on border radius ie8.
Update 10 June, 2009: Some servers need to set MIME type for HTC to work this in IE6.
To do this, follow the steps.
1. Go to your cpanel and click the MIME Types link
2. Under MIME Type, add text/x-component
3. Under Extensions, add htc
4. Restart Apache Web server
As I’ve pledged, today I’m posting the Curved corner without any js stuff.
For firefox, you can set border-radius by prefixing “-moz” to the css property. And ofcource for webkit use “-webkit” . Now IE ?? .. As IE is not a good browser to work with css, we need to make it so. Here, you need to use a nice css hack. Some how I managed to have an htc file to make border-radius work in IE 🙂 . You can download it here. border-radius.htc .
The Demo
1 . I’ve just made: http://www.htmlremix.com/files/20080924-border-radius.zip
The CSS:
- .curved {
- -moz-border-radius:10px;
- -webkit-border-radius:10px;
- behavior:url(border-radius.htc);
- }
The HTML:
<div class="curved">Curvd div</div>
The explanation :
Do you really want an explanation for this simple 3 line css ?. I don’t think so. Ofcourse if you need, I can.
Browsers :
All browsers 🙂
Download
Many people failed to find a download link. So no one will miss it again now 🙂
need help in making my div’s transparent whilst using the htc extension. css opacity not working with htc. any ideas??
hi you guys working fine in ie8 but the problem is i can’t make my div’s transparent anymore. is there anyway i can use the htc extension and still be able to make my div’s transparent.thanks alot you guys
This plugin really works:
http://malsup.com/jquery/corner/
Individual corners can be styled, and not only round but many other styles.
The script seems to depend on the containing DIV. IE[8+9] shows an inline style that overwrites the CSS I provided. If I use “IE Dev Tools” to turn off the inline style, then the code works perfectly. This is a great script but needs to be modified to allow for this little issue.
Please attach folder with sample html, css.
Thanks
Its Not working In ie 8
Not working
Please provide us a demo folder for download
with contents html, css & all content needed for support
Is it possible to make only the top corners rounded?
Must not work anymore. I just tried it (both files and demo) in IE8 with no luck. 🙁
hello, just wanted to as if there is a option to round one corner at a time with .htc? cause it works fine when rounding all corners together but when I try to round lets say upper left corner it just shows nothing. Thanks for your help
Just in case others have teh same problem:
Sometimes the corners don’t show and an error is raised .. line 87.
In my case this was because I had nested the div concerned inside a div with display:none, which I set to block when the page had loaded.
Border radius attempts to apply the corners while the display is none and thus finds no offsetwidth to apply thus the error!
When I eliminate “float:left” the corners appear in IExplorer.
Tried to get it worked with IE8.
Neither my page or the demo page does work for the IE8. There Must be a Bug. Can anyone say where’s the problem in the demo?
Try it at your pc with IE8, it won’t work
Are you sure? My IE6-8 worked fine without a problem.
Good work………………
your provide code is working fine in simple html and .net;but i apply in php joomla css3 is not working in i6.
what can i do? can you plz some subjugation.
Best regards,
Apurva
not working in iframe
here you go…
http://code.google.com/p/curved-corner/downloads/detail?name=border-radius.htc
follow instruction on this page and youll be ok 😉
Hi guys, I tried to apply for that stupid IE behaviour, but it doesn’t work. I also downloaded a demo version, and it also refuses to round corners. I looked at IE6-8, none of that idiot browsers recognizes .htc file. What’s wrong? Why it doesn’t work for me?
I’ve just started using the CSS3 circle trick for something I find cool (cf blog entry re CSS3 and musicology) but am using jQuery.
Given that ie-css3.htc uses ondocumentready, is it going to conflict with jQuery?
….I’d rather give up IE support than give up jQuery, at least for now (more interested in improving the cool app than support other browsers, at least right now).
Also, I find the first 16 lines puzzling – how is that these get treated as comments? I don’t see a comment delimiter I recognize (yeah, newb Q, sorry). Can the inclusion of ie-css3 be conditional (or is already via a means I don’t recognize – newbII…)?
Thanks!
I have never been able to get this to work. Tried all manner of was of adding it, relative path, absolute path, nothing works at all for me on IE7/IE8.