Random thoughts on art, technology, stuff, and occasionally Real Estate: Setting opacity in stylesheet

Setting opacity in stylesheet

Note to self:

To set the opacity of a div in a stylesheet, do this:

#wrapper {
       width: 950px;
       margin: 0 auto;
       background: url("images/wrapper.jpg") repeat-y;
       text-align: left;
 filter:progid:DXImageTransform.Microsoft.Alpha(opacity=88);
        -moz-opacity:0.88;

The Microsoft Alpha Filter: DXImageTransform.Microsoft.Alpha being the secret ingredient.

And don't forget to ID the div in the HTML file, like this:

    <div id="wrapper">

1 commentCheryl Johnson • March 08 2009 10:27AM

Comments

I love these little "notes to self". It lets me know that I am so totally in the woods wehn it comes to coding and customoizing and the like that I feel my money is well spent on someone who know what the heck all this means.  :-)

Posted by Ken Montville -- the MD Suburbs of DC (RE/MAX Advantage Realty) almost 3 years ago

This blog does not allow anonymous comments