How to center my dialog window inside a div?

Posted on 2013-05-10
Last Modified: 2013-05-13
Hello guys

I have a div that is the container of my html code. Something like this:

  <div id="container">
     all my html code is here

Open in new window

When I call the dialog, I want it to open in the center of the div container

I use dialog Widget, this code

How can I do this?
Question by:hidrau
LVL 82

Accepted Solution

leakim971 earned 500 total points
ID: 39156714
.dialog({ position:  { my: "center", at: "center", of: "#container" } });

Author Closing Comment

ID: 39161095
thanks very much friend

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

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question ( on how to make a page show some balloons animate up a page…
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
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)

911 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

15 Experts available now in Live!

Get 1:1 Help Now