I have a div which contains a header and a form.
It floats over other elements and I would like to make it’s background transparent.
I can’t figure out how to make the background transparent while keeping the input fields, and text fully opaque.
I have tried the following:
var control = $("myControlDiv");
control .show();
control .setStyle({opacity:"0.60", filter:"alpha(opacity=60)"});
var children = control .childElements;
for (var i = 0 ; i < children.length; i++)
children[i].setStyle({opacity:"1.00", filter:"alpha(opacity=100)"});
Thanks for the help.
You need to set the background, not the opacity.
There are various approaches you can take. The more efficient ones have the poorest browser support. This article describes how to implement them in a backwards compatible fashion.