Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

border-radius doesn't work on IE10

I need to have a container "DIV" with rounded corners. The following code works perfectly on all browsers except my IE10. I have no clue how to do in order to make it work.

#about-kader {
    width: 200px;
    height: 180px; 
    float: left;
    margin: 0px auto;
    background-color: #9bafc4;
    padding: 3px;
    border-radius: 5px; 
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px; 
    -khtml-border-radius: 5px;
    -ms-border-radius: 5px;
    behavior: url(border-radius.htc);
}

And here's the HTML part, please:

<div id="about-kader">
...
...
...
</div>

There is no way to make any round corner visible on IE10. The version I have is: 10.0.9200.16576, Update versions: 10.0.5 (KB289530).

like image 281
Tiz Avatar asked May 18 '13 10:05

Tiz


People also ask

How do you give the border-radius only at the bottom?

CSS Syntaxborder-bottom-left-radius: length|% [length|%]|initial|inherit; Note: If you set two values, the first one is for the bottom border, and the second one for the left border. If the second value is omitted, it is copied from the first. If either length is zero, the corner is square, not rounded.

What is border-radius css3 property used for?

The border-radius property is specified as: one, two, three, or four <length> or <percentage> values. This is used to set a single radius for the corners. followed optionally by "/" and one, two, three, or four <length> or <percentage> values.

Why do we use border-radius?

The border-radius property defines the radius of the element's corners. Tip: This property allows you to add rounded corners to elements!


1 Answers

Thanks to Flipbed's answer I found the answer. On IE10, the "border-radius" to me doesn't work. In order to get it working, it's necessary to specify each corner:

border-top-left-radius:5px;
border-top-right-radius:5px;
border-bottom-left-radius:5px;
border-bottom-right-radius:5px;

Indeed the site you sent, does exactly that (look the page source). It gives as output the instruction:

border-radius: 5px;

but internally it declares the 4 corners separately as above.

This was extracted from the question and posted on the OP's behalf.

like image 65
2 revs Avatar answered Sep 22 '22 22:09

2 revs