Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a link which opens my visual webpart inside Modal Dialog. I need to change the background color of Modal Dialog content area..dont want to make change in my custom css which is overiding corev4.css ..just want to make a change for a specific modal dialog.

share|improve this question
add comment

2 Answers

You could write out the CSS as part of your web part if that's the only place that web part is shown. Unfortunately, you can't reliably target CSS for a child frame, so you can't include that background color as part of the link (and have it work across all browsers).

You could also add a user control to the masterpage that checks for a query string. If that query string is set, override the background color. That's likely a bit overkill for what you want (if it's a one off scenario), but that would allow you to assign the background color through the URL to the dialog source.

share|improve this answer
add comment

Apply this css..

.ms-dialog body #s4-workspace {

     background-color:#F6F6F6;

   }
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.