Last week, I wanted to create a translucent layer to grey out functionality on the site. To do this, create a div that covers the window and set the background color to black.
But how to make it translucent? This webpage on CSS opacity covers how to do this and many other useful things:
.grey_background { background: black; filter:alpha(opacity=25); -moz-opacity:.25; opacity:.25; }
The “filter” rule is for IE (taking advantage of a very old feature that dates back at least 5 years) and the “-moz-opacity” rule is no longer needed for newer versions of Firefox and Mozilla which support the CSS3 spec. Safari also supports the spec.