This is a migrated thread and some comments may be shown as answers.

Change modal background color

2 Answers 361 Views
Window
This is a migrated thread and some comments may be shown as answers.
Kenneth Jackson
Top achievements
Rank 1
Kenneth Jackson asked on 04 Mar 2009, 06:45 PM
I want to change the background color of the modal overlay from the default gray color to something more consistent with other overlays I am using in my application.  I see that there is access to the TelerikModalOverlay class, however, the div that this is part of has an inline style for the color.  Is there any way to set the color?

The html for the overlay is below:
<div class="TelerikModalOverlay" style="position: absolute; left: 0px; top: 0px; z-index: 7999; background-color: rgb(170, 170, 170); opacity: 0.5; width: 1904px; height: 825px;" unselectable="on"/> 

2 Answers, 1 is accepted

Sort by
0
Kenneth Jackson
Top achievements
Rank 1
answered on 04 Mar 2009, 06:49 PM
I figured it out.  I needed to put !important in the style declaration.

My syntax now for anyone that might need an example:

.TelerikModalOverlay     
{     
  filter: alpha(opacity=60) !important;/*for IE 5.5+*/    
  opacity: .60 !important;/*for FF 2x, Opera 9x*/    
  -moz-opacity: .60 !important;/*for FF 1x*/     
  background-color: Black !important;       
}   
0
Georgi Tunev
Telerik team
answered on 05 Mar 2009, 10:54 AM
Hi Kenneth,

Yes, when overriding classes, you need to use the !important directive for your changes to take effect. As an alternative, you could create a custom skin that you could use with the control.
More information on the subject is available in the Controlling Visual Appearance section of the documentation.


Kind regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Window
Asked by
Kenneth Jackson
Top achievements
Rank 1
Answers by
Kenneth Jackson
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or