Setting opacity 0 for a form <select> element in IE6

Discussion in 'JavaScript' started by Kinaski, Sep 6, 2009.

  1. #1
    Hi all!

    In order to design a custom select element look in my site, I was messing with the css and opacity value to fade the actual select box and put a background image in a div right above the select element. The functionality of the select box is preserved no matter if opacity is set to 0, so I was able to accomkplish my goal.

    But, that worked for every other browser around except IE6. No matter how I try to set the opacity to a select element/:

    
    
    select#combo{filter: alpha(opacity = 0);}
    
    Code (markup):
    or through jQuery script

    
    $('select#combo').css('opacity', 0);
    
    Code (markup):
    But that simply doesn't work for IE6. I also tried putting zoom:1 to gain hasLayout for the select element, but still nothing.

    Is there a please someone there that encountered this problem and possibly knows some kind of workaround?

    Thank you very much in advance!

    Kinaski
     
    Kinaski, Sep 6, 2009 IP
  2. caprichoso

    caprichoso Well-Known Member

    Messages:
    433
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    110
    #2
    caprichoso, Sep 7, 2009 IP