CFWINDOW change modal mask color

Posted At : October 9, 2007 6:22 AM | Posted By : Dave
Related Categories: ColdFusion 8

I as noticing that the modal mask for cfwindow was rather minor. Also, I wanted to change its color to match the theme of the site I was working on. So, using my buddy firebug, I was able to get the class used for the mask.

.x-dlg-mask{
   background-color: #000000;
   opacity:0.50;
}

I was then able to use it to change the color and opacity of the overlay. Just put this code before the cfwindow tag or in your site's css file.

--Dave

Comments
Dave,

I have tried this but the style didn't change. Have you had to change anything?
# Posted By Tim Rubel | 8/14/08 8:54 PM
nice - worked sweet.
Tim - use <style> tags around it and place it above the cfwindow call.
# Posted By pxt | 8/19/08 2:43 PM
This only works post version 8.01 of Coldfusion. It won't work on 8.0.
# Posted By Michael Daniels | 10/2/08 8:46 AM
Just what I was looking for. I have this style added in an externally linked CSS file, not within Style tags, and it is working cross browser.

Note: The mask colour did not change at first, but then I added "!important" and it overwrote the default.

.x-dlg-mask{
background-color: #000000 !important;
opacity:0.50;
}

VERSION: ColdFusion 8,0,0,176276
# Posted By Steve Glachan | 10/22/08 11:27 PM