How to center my dialog window inside a div?

Hello guys

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

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

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

http://api.jqueryui.com/dialog/#option-position

How can I do this?
LVL 1
hidrauAsked:
Who is Participating?
 
leakim971PluritechnicianCommented:
.dialog({ position:  { my: "center", at: "center", of: "#container" } });
0
 
hidrauAuthor Commented:
thanks very much friend
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.