Solved

Remove Padding From MVC 4 Partial View in jQueryUI Dialog

Posted on 2013-06-11
3
528 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
ID: 39240052
A link can help.
0
 

Author Comment

by:GenericCog
ID: 39248006
@HagayMandel, a link to what?
0
 
LVL 16

Accepted Solution

by:
HagayMandel earned 500 total points
ID: 39248235
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
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)

863 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

23 Experts available now in Live!

Get 1:1 Help Now