views:

29

answers:

1

I have tried the following:

<%= image_tag '...path_to_img', :filter => "alpha(opacity=50)" %>

But it doesn't work. At least it doesn't create errors, but it doesn't make it opaque, either. I'm rusty on my html/css, and I think from what I've researched so far that the filter/alpha/opacity I tried above is actually css instead of html.

+1  A: 

You might want to look into opacity issues w/ different browsers. IE 6 and 7 use a filter others use opacity. In any case I believe you need to move your options into a string not a hash for the image_tag helper.

Try this and compare the html outputted.

<%= image_tag 'foo.gif', :style => "opacity:0.5; filter:alpha(opacity=50);" %>

Nick
That worked, thanks!