css3 gradient and border-radius
this is my first post so sorry in advance for any mistakes.
the problem I'm facing is that i try to use both a gradient background and rounded corners on a div and it all works fine in chrome, firefox and opera but in ie the minute i use the gradient it flows out of the rounded corners.
below is the code snippet for the css
would appreciate any help regarding this.
border-radius:10px; /* rounded corners */
border:1px solid #000;
background: #9a4a0d; /* Old browsers */
background: -moz-linear-gradient(top, #9a4a0d 0%, #611e03 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#9a4a0d), color-stop(100%,#611e03)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #9a4a0d 0%,#611e03 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #9a4a0d 0%,#611e03 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #9a4a0d 0%,#611e03 100%); /* IE10+ */
background: linear-gradient(top, #9a4a0d 0%,#611e03 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9a4a0d', endColorstr='#611e03',GradientType=0 ); /* IE6-9 */
I can't really say why it's doing that since I've never tried actually coding a gradient. I've always just gone into Photoshop (or a similar image editing program) and created a blank document and filled it with the gradient I wanted, then set that image as the Div's background image. Just seems much cleaner to me.
yeah i know but i'm actually trying to do it in css only. failing which i guess i'll have to go back to an image.
I've resorted to not doing gradients in IE with the curved corners. As far as I can tell, this is a bug in the CSS3 implementation. Hopefully by the time the standard is solid and they come out with a conforming IE release, it'll be fixed.
JW: Take a look at the CSS gradients, they make life very much easier (IMO) than doing the same with various little images made in PS. When it works, that is
I can understand that. I'm not all that proficient in PS myself honestly. But when it comes to that CSS working properly it's a big if, especially when dealing with IE
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread