Solved

Remove Padding From MVC 4 Partial View in jQueryUI Dialog

Posted on 2013-06-11
3
525 Views
Last Modified: 2013-06-14
I'm need to remove the padding on a jQuery UI dialog container.
The dialog is being loaded by calling a partial view from the controller through the click event.  Meaning, my content does not exist when the page is rendered.  Not sure if that is the issue, but any help is appreciated.

var dialogStyle_StayDelete = { modal: true, width: 725, height: 500, show: captureConfig.defaultDialogShowEffect, hide: captureConfig.defaultDialogHideEffect, draggable: false, resizable: false, closeOnEscape: false };
    $('#modalMain-StayDelete').dialog(dialogStyle_StayDelete, {}).dialog("widget").find(".ui-dialog-titlebar").hide();

Open in new window

I've tried the following bit of code both before and after without any change.
$(".ui-dialog-content").css("padding", 0);

Open in new window

0
Comment
Question by:GenericCog
  • 2
3 Comments
 
LVL 16

Expert Comment

by:HagayMandel
Comment Utility
A link can help.
0
 

Author Comment

by:GenericCog
Comment Utility
@HagayMandel, a link to what?
0
 
LVL 16

Accepted Solution

by:
HagayMandel earned 500 total points
Comment Utility
If your'e using the default stylesheet, make sure to load YOUR stylesheet, with the following css rule, AFTER jquery-UI stylesheet is loaded.

.ui-dialog .ui-dialog-content {
    padding: 0;
}

Open in new window

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now