Joe Titterton
Joe Titterton

Reputation: 39

bottom border not showing up in ie

My divs have rounded borders in every browser except ie. I think I need some compatibility css.

http://jsfiddle.net/SineMetu/PQtbw/2/

HTML:

<div class="upper_button">
    <a href="http://www.yahoo.com/" target="_blank"><h2>Blah2</h2></a>
</div>
<div class="upper_button">
    <a href="http://www.google.com/" target="_blank"><h3>Blah</h3></a>
</div>

CSS:

.upper_button {
    padding: 5px 20px;
    width: 120px;
    float: right;
    height:22px;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
    background: rgb(147,206,222); /* Old browsers */
    background: -moz-linear-gradient(top, rgba(147,206,222,1) 0%, rgba(117,189,209,1) 41%, rgba(73,165,191,1) 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(147,206,222,1)), color-stop(41%,rgba(117,189,209,1)), color-stop(100%,rgba(73,165,191,1))); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, rgba(147,206,222,1) 0%,rgba(117,189,209,1) 41%,rgba(73,165,191,1) 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, rgba(147,206,222,1) 0%,rgba(117,189,209,1) 41%,rgba(73,165,191,1) 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, rgba(147,206,222,1) 0%,rgba(117,189,209,1) 41%,rgba(73,165,191,1) 100%); /* IE10+ */
    background: linear-gradient(top, rgba(147,206,222,1) 0%,rgba(117,189,209,1) 41%,rgba(73,165,191,1) 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#93cede', endColorstr='#49a5bf',GradientType=0 ); /* IE6-9 */
    -moz-box-shadow: 1px 1px 1px rgba(000,000,000,0.2),
        inset 0px 0px 0px rgba(255,255,255,0);
    -webkit-box-shadow: 1px 1px 1px rgba(000,000,000,0.2),
        inset 0px 0px 0px rgba(255,255,255,0);
    text-shadow: 0px -1px 0px rgba(000,000,000,0),
        0px 1px 0px rgba(255,255,255,0.3);

Upvotes: 1

Views: 1636

Answers (3)

j08691
j08691

Reputation: 207881

IE8 and below don't support the border-radius property.

There are a load of workarounds such as:

Upvotes: 1

MoDFoX
MoDFoX

Reputation: 2134

For IE9, your filter is what causes it.

IE filters break out of the border-radius, you can test this by changing the background to a solid colour and removing the filter. See here: http://jsfiddle.net/PQtbw/12/

Edit: To fix it, add a wrapper to your button and make that have the border-radius, then set overflow: hidden;

see here: http://jsfiddle.net/PQtbw/13/

Upvotes: 0

velocityhead
velocityhead

Reputation: 172

IE versions below IE9 do not support border-radius.

IE9 does support it, but your example is not working because IE has an issue when applying both a border-radius and a CSS gradient to the same element.

Upvotes: 0

Related Questions