?
Solved

Remove Padding From MVC 4 Partial View in jQueryUI Dialog

Posted on 2013-06-11
3
Medium Priority
?
570 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 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn how to dynamically set the form action using jQuery.
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…
Suggested Courses
Course of the Month16 days, 15 hours left to enroll

862 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