views:

38

answers:

1

In the webkit and moz vendor specific properties for CSS gradients, you can specify the height of the gradient. Is there something similar for IE? For example:

filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', endColorstr='#ffffff'); /* IE */
background: -webkit-gradient(linear, left top, left 3, from(#aaaaaa), to(#ffffff)); /* webkit */
background: -moz-linear-gradient(top,  #aaaaaa,  #ffffff 3px); /* firefox */

How can I specify a 3px high gradient in IE?

A: 

It's a hack, but you could create a duplicate div with a defined height of 3px and apply the IE filter to that.

Or you could avoid the IE code bloat, and accept that IE will have a different aesthetic than more capable browsers (square corners included).

kingjeffrey