CSS Hack: Using RGBA in IE

background-color: rgba(r,g,b,alpha) is not supported by IE browsers up to IE9. But there is a workaround- by converting rgba() into #argb and using gradient filter.

More information on rgba() to #argb conversion and a simple conversion utility can be found here: http://kilianvalkhof.com/2010/css-xhtml/how-to-use-rgba-in-ie/. 

Once rgba() is converted to #argb, you can then use the gradient opacity filter like this:
background:none;
-ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26ffffff,endColorstr=#26ffffff);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26ffffff,endColorstr=#26ffffff);
zoom: 1;

Comments

  1. Genius!!! You are absolute genius!!
    I’ve been looking for ages to fix this IE transparency bug. The only code that works was yours.
    Thanks a lot for sharing

    ReplyDelete
    Replies
    1. Hi Tiago,
      I'm glad my solution has helped you.
      Cheers

      Delete

Post a Comment

Popular posts from this blog

How to resolve 'res://ieframe.dll/acr_error.htm#' error (Internet Explorer stopped working while viewing a website)

htaccess: Redirecting multiple domains to the main domain

MailChimp API V2.0 SSL error solution