While experimenting with background gradients and borders one day just for the fun of it, I made an interesting observation in Internet Explorer.
The issue I encountered was that the background color was overflowing outside the radius border, but this only happened in IE. I am using IE 9 and it's not in quirks mode.
Below is the CSS code I have been using:
body { background-color:#e0dfdf; }
.mainbaloon { background: #1e5799; /* Old browsers */
background: -moz-linear-gradient(top, #1e5799 0%, #2989d8 50%, #7db9e8 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1e5799), color-stop(50%,#2989d8), color-stop(100%,#7db9e8)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #1e5799 0%,#2989d8 50%,#7db9e8 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #1e5799 0%,#2989d8 50%,#7db9e8 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #1e5799 0%,#2989d8 50%,#7db9e8 100%); overflow: hidden; /* IE10+ */
background: linear-gradient(to bottom, #1e5799 0%,#2989d8 50%,#7db9e8 100%); /* W3C */
background-clip: padding-box;
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=0 ); /* IE6-9 */
width: 750px;
border: 1px solid #000;
/* Border Radius for All Browsers START */
border-radius: .5em;
-moz-border-radius: .5em;
-webkit-border-radius: 15px;
-ms-border-radius:.5em;
/* Border Radius for All Browsers END */
I have tried adding the Meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
as well as playing around with the -ms-border-radius property and various attempts with
overflow:hidden;
background-clip:
but nothing seems to solve the issue. Any ideas on what else could be causing this background spillage in IE?