0

I have a created a custom button for my site which look fine in chrome

enter image description here

but in IE it has white corners

enter image description here

I have tried all I can to remove the white corners but I have no idea how.

Here is the style that I have used below:

   <input type="submit" value="Search" class="button1">

and the CSS rule is:

   .button1{
        height:26px;  font-size:12px;  font-weight:bold;   cursor:pointer; float:right;   
        padding-left:10px;   padding-right:10px;  margin:2px;  font-family:verdana,arial, helvetica, sans-serif; 
        border:1px solid #000;   border-width:1px;   float:left;
        -webkit-border-top-right-radius:    5px;    -moz-border-radius-topright:    5px;   border-top-right-radius:     5px;
        -webkit-border-bottom-right-radius: 5px;    -moz-border-radius-bottomright: 5px;   border-bottom-right-radius:  5px;
        -webkit-border-top-left-radius:     5px;    -moz-border-radius-topleft:     5px;   border-top-left-radius:      5px;
        -webkit-border-bottom-left-radius:  5px;    -moz-border-radius-bottomleft:  5px;   border-bottom-left-radius:   5px;
        background-color:#F00;
        background: rgb(254,255,232); /* Old browsers */
        background: -moz-linear-gradient(top,  rgba(254,255,232,1) 0%, rgba(214,219,191,1) 100%); /* FF3.6+ */
        background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(254,255,232,1)), 
            color-stop(100%,rgba(214,219,191,1))); /* Chrome,Safari4+ */
        background: -webkit-linear-gradient(top,  rgba(254,255,232,1) 0%,rgba(214,219,191,1) 100%); /* Chrome10+,Safari5.1+ */
        background: -o-linear-gradient(top,  rgba(254,255,232,1) 0%,rgba(214,219,191,1) 100%); /* Opera 11.10+ */
        background: -ms-linear-gradient(top,  rgba(254,255,232,1) 0%,rgba(214,219,191,1) 100%); /* IE10+ */
        background: linear-gradient(to bottom,  rgba(254,255,232,1) 0%,rgba(214,219,191,1) 100%); /* W3C */
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#feffe8', endColorstr='#d6dbbf',GradientType=0 ); /* IE6-9 */


    }
Matt Coughlin
  • 18,666
  • 3
  • 46
  • 59
mk_89
  • 2,692
  • 7
  • 44
  • 62

2 Answers2

2

This is a duplicate of this question.

The solution given suggests adding a wrapper div to handle the corners and IE's inability to mix and match. http://jsfiddle.net/UME84/

.corners {
    border:1px solid #000;
    border-radius:5px;
    margin:2px;
    overflow:hidden;
    float:left;
}

Tested in IE9.

Community
  • 1
  • 1
Jim H.
  • 5,539
  • 1
  • 24
  • 23
  • Thanks for the link, interestingly enough jsfiddle doesn't seem to support older IE browsers. – mk_89 Apr 04 '13 at 20:51
  • 2
    @mk_89: When you need to share a jsfiddle link for older versions of IE, use the standalone version of the demo, which is simply the regular URL plus "show". For example: jsfiddle.net/abcde/1/show – Matt Coughlin Apr 04 '13 at 20:53
1

For IE9-

<!--[if gte IE 9]><style type="text/css">.button1 {filter: none;}</style><![endif]-->

Or set border-radius:0px; in all IEs

    <!--[if IE]>
       <style type="text/css">
        .button1 {
          filter:none;
          border-radius:none;
        }
       </style>
    <![endif]-->

CSS :

.button1{
        height:26px;cursor:pointer;
        padding-left:10px;
        padding-right:10px;
        margin:2px;
        font:bold 12px verdana,arial,helvetica,sans-serif;
        float:left;
        border:1px solid #000;
        border-radius:5px;
        background: #feffe8;
        background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZlZmZlOCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkNmRiYmYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
        background: -moz-linear-gradient(top, #feffe8 0%, #d6dbbf 100%);
        background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#feffe8), color-stop(100%,#d6dbbf));
        background: -webkit-linear-gradient(top, #feffe8 0%,#d6dbbf 100%);
        background: -o-linear-gradient(top, #feffe8 0%,#d6dbbf 100%);
        background: -ms-linear-gradient(top, #feffe8 0%,#d6dbbf 100%);
        background: linear-gradient(to bottom, #feffe8 0%,#d6dbbf 100%);
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#feffe8', endColorstr='#d6dbbf',GradientType=0 )
}

PS: Untested

Please, Bring older IEs users who will still using IE to download Google Chrome Frame

l2aelba
  • 21,591
  • 22
  • 102
  • 138