I would like to know how to apply border-radius to IE8 and below IE8 browsers.
I know that border-radius is a HTML5 feature and IE8 doesn't support it.
I found that by using .htc we can achieve this but by using htc I am encountering the problem of black background.
I am unable to overcome this problem.
Is there any other way of applying border-radius to IE8? If so can anyone explain me how?
Option 1
http://jquery.malsup.com/corner/
Option 2
http://code.google.com/p/curved-corner/downloads/detail?name=border-radius-demo.zip
Option 3
http://css3pie.com/
Option 4
http://www.netzgesta.de/corner/
Option 5
See this question
EDIT:
Option 6
https://code.google.com/p/jquerycurvycorners/
Firstly for technical accuracy, border-radius is not a HTML5 feature, it's a CSS3 feature.
The best script I've found to render box shadows & rounded corners in older IE versions is IE-CSS3. It translates CSS3 syntax into VML (an IE-specific Vector language like SVG) and renders them on screen.
It works a lot better on IE7-8 than on IE6, but does support IE6 as well. I didn't think much to PIE when I used it and found that (like HTC) it wasn't really built to be functional.
PIE makes Internet Explorer 6-9 capable of rendering several of the most useful CSS3 decoration features
http://css3pie.com/
................................................................................
The border-radius property is supported in IE9+, Firefox 4+, Chrome, Safari 5+, and Opera, because it is CSS3 property.
so, you could use css3pie
first check this demo in IE 8 and download it from here
write your css rule like this
#myAwesomeElement {
border: 1px solid #999;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
behavior: url(path/to/pie_files/PIE.htc);
}
note: added behavior: url(path/to/pie_files/PIE.htc); in the above rule. within url() you need to specify your PIE.htc file location
As the answer said above, CSS PIE makes things like border-radius and box-shadow work in IE6-IE8: http://css3pie.com/
That said I have still found things to be somewhat flaky when using PIE and now just accept that people using older browsers aren't going to see rounded corners and dropshadows.
HTML:
<div id="myElement">Rounded Corner Box</div>
CSS:
#myElement {
background: #EEE;
padding: 2em;
-moz-border-radius: 1em;
-webkit-border-radius: 1em;
border-radius: 1em;
behavior: url(PIE.htc);
border: 1px solid red;
}
PIE.htc file can be downloaded from http://www.css3pie.com
Related
Working on my home page where I'm cycling through some images using JQuery's fadeIn and fadeOut methods.
The images have a border of 2px and a radius of 14px applied.
As you can see, the corners of the image are overlapping the border.
This behavior only happens in Safari and Chrome, not in Firefox and IE.
Anyone have any idea as to why?
You can see this behavior here:
http://www.findyourgeek.com/index-copy.php
Thanks.
Support for border-radius on images in Chrome/Safari (or rather Webkit) seems to be a bit buggy
Chrome -webkit-border-radius bug? - CSS-Tricks Forums
The above post is from earlier in the year (~Chrome ver 10) when the support for border-radius on images wasn't working. Support is available know but like you're seeing it still has some issues. You may want to report the bug you're seeing to the Webkit/Chrome/Safari projects. I know there was a fairly easy to find bug reporting page for Chromium, not sure about the other two.
Here are two ideas for workarounds:
you can apply sort of a CSS3 hack by removing the 2px border and setting a 2px stroke box-shadow (box-shadow:0 0 0 2px #606060;). This would have a few drawbacks as it's only a fix for Chrome/Safari example jsfiddle
or of course the other option is to edit the photos to give them rounded corners (http://www.roundpic.com/ is a good site for this)
try removing the border styling from the image itself and adding it to #content #topStoriesTest
#content #topStoriesTest {
border: 1px solid #CCCCCC;
border-radius: 14px;
-webkit-border-radius: 14px;
-moz-border-radius: 14px;
height: 318px;
overflow: hidden;
position: relative;
width: 549px;
}
I set a curve style for button and tab control. It's working properly in Firefox, but not in IE.
Here is the CSS:
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
-o-border-radius: 15px;
border-radius: 15px;
-webkit-border-radius: 15px; /* Experimental implementation of CSS 3 feature for webkit */
-moz-border-radius: 15px; /* Experimental implementation of CSS 3 feature for Mozilla */
-o-border-radius: 15px; /* Experimental implementation of CSS 3 feature for Opera */
border-radius: 15px; /* CSS 3 feature that is not yet a recommendation */
You shouldn't expect to see support in it for Internet Explorer (except version 9 beta)
However, it is just cosmetic, so don't worry about it. People using Internet Explorer just don't get curved corners — it isn't a big deal, the content is still available.
IE isn't able to work with that.
If you want to curve your edges in IE you'll have to use another approach.
You can't do this in IE I believe. There are some hacks to get it to work though. I've used this before and I think it good with older vs. of ie too. http://www.htmlremix.com/css/curved-corner-border-radius-cross-browser
If you really wnt a curved corner in IE go to Curvycorners & download a stable version of it. Its just a javaScript file. Then refer the "curvycorners.src.js" file from your project & write the same CSS code you are writing "-webkit-border-radius: 15px;
-moz-border-radius: 15px;
" except the other two properties. It will definitely work. Works for me, so for you.
if you want to apply CSS in IE8 or greater then it may no need to changes in CSS as you declare in FF but if you need to use IE7 then you may need to use below syntax.
#webkit-border-radius: 15px;
#moz-border-radius: 15px;
#o-border-radius: 15px;
#border-radius: 15px;
Thanks.
I want to round the corner of my picture by using css in IE7,8 and Firefox.
I have try to use -moz-border-radius for Firefox but it just round only border not the picture.
Link to picture: http://i108.photobucket.com/albums/n33/ligthing_illuminate/problemwithcorner.png
and the css which I use is following:
.content p img {
float:left;
margin:0;
padding:0;
width:780px;
border: 10px solid white;
-moz-border-radius: 15px;
}
and in IE7,IE8 are not work with border-radius.
Anyone can help me?
Thanks you in advance.
-mos-border-radius is not supported in IE 7 or 8....you will need to revert to rounding images or Nifty Corners to implement rounded corners in IE 7 or 8
Your best bet is to make the image itself have rounded corners.
But this could be helpful too maybe: http://www.devwebpro.com/25-rounded-corners-techniques-with-css/
See the -moz part at the start of the -moz-border-radius CSS rule?
It means that this is a vendor specific extension (in this case for mozilla/firefox).
It is not supported on other browsers.
My css is not working with Iexplorer, can someone explain me why this isn't working?
The HTML
<div class="myBox"> Content <div>
The CSS:
.myBox {
margin: 0.0in auto;
color: #FFF;
width: 450px;
height:450px;
padding: 12px;
text-align: left;
background-color: #444141;
border: 0px solid #4e4b4b;
/* Do rounding (native in Firefox and Safari) */
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
}
.myBox h2 {
color:#f57f20
}
IE doesn't support CSS3 rounded corners, I'd suggest a fallback to using PNG images.
Just use the CSS3 property border-radius. Sure, it probably won't work until IE9, which goes back to the age old question...
Do web sites need to look exactly the same in every browser?
You should use htc file to curve corners in IE6+. In IE9 the CSS3 declarations will work. How to use htc file to curve corners you can find here http://starikovs.com/2010/08/24/css3-rounded-corners/.
Because IE does not support custom Mozilla or WebKit properties.
An option could have been using CSS3 browser-independent round corner properties, but it is not yet widely implemented across major browsers. So for now you'll have to stick to images if you want cross-browser compatibility or function with JavaScript disabled.
I want to use rounded border in my site. So, I use the CSS rounded border property like this:
-moz-border-radius-topright: 7px;
It works well in Firefox, but in Google Chrome, it does not work. Why?
-moz-... is for Firefox etc. Use -webkit-...:
-webkit-border-top-right-radius: 7px;
-moz-border-radius-topright: 7px;
Also note the slight difference in syntax.
You can combine these as you like. -webkit-... will only be recognized by WebKit browsers (Chrome, Safari), -moz-... will only be recognized by Mozilla-based browsers (Firefox.)
The reason why, is that is a Mozilla specific (i.e. Firefox) CSS selector. The relevant CSS3 selector would be:
border-top-right-radius
Webkit (i.e. Safari) also has a non-standard selector: -webkit-border-top-right-radius. Since Google Chrome is based on Webkit, I'd expect -webkit-border-top-right-radius to work.
I'd personally include all 3 selectors (as below), then you won't need to edit sometime in the future when everyone catches up with the standard. (Firefox 3.5 is already there as far as I know).
.thing{
...some styles...
-moz-border-radius-topright:7px;
-webkit-border-top-right-radius:7px;
border-top-right-radius:7px;
}
Chrome uses WebKit for rendering, same as Safari. You'll have to add one more CSS property to your class -
.YourClass
{
-moz-border-radius-topright: 7px; /* For Mozilla browsers */
-webkit-border-top-right-radius: 7px; /* For WebKit-based browsers */
}