Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE9 border-radius shorthand not supported?

I have a few things I've made in the past that have the border-radius attribute like this:

border-radius: 7px;

This is not working in IE9. I thought IE9 was supposed to support border-radius? If you need an example, see this site. All of the boxes on the right hand side of the page should have a curved border. It works in Chrome and Firefox...

On another annoying, unrelated note, I found out today that IE9 doesn't support the :last-child pseudo class. What an incredible letdown so far...

like image 310
Aaron Avatar asked Mar 16 '11 04:03

Aaron


3 Answers

Have you included this:

<meta http-equiv="X-UA-Compatible" content="IE=9" />

See this thread.

like image 69
Mark Westling Avatar answered Oct 19 '22 16:10

Mark Westling


Yes the answer to this correct, however as a related side note, IE9 currently does not support border radius used in conjunction with the gradient filter.

Spent an hour trying to make this work before bothering to search for a similar question.

// This is the filter code for a gradient in IE (6-9) along with a border radius
//THIS DOES NOT WORK
//You have to use one or the other, you could use javascript for rounded corners and then use the gradient if you wish    

filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#bcdd68', endColorstr='#355e0b',GradientType=0 ); /* IE6-9 */

/*border radius*/
 -khtml-border-radius:5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
like image 26
Psypha Avatar answered Oct 19 '22 15:10

Psypha


IE9 does support border radius, even shorthand. I'm not sure why it doesn't work on your website, but it is supported.

(See http://jsfiddle.net/wJd2h/ for proof)

IE9 also supports :last-child.

Maybe you are using an old HTML doctype?

EDIT: I looked at your source. Change <meta http-equiv="X-UA-Compatible" content="IE=8" /> to <meta http-equiv="X-UA-Compatible" content="IE=9" />

like image 44
Peter Olson Avatar answered Oct 19 '22 16:10

Peter Olson