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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Jquery form 9 65
Building JSON/JQuery Results Display 11 55
Why does my submit button remain disabled 3 36
return to same tab when data is posted 6 30
DOM Attributes and Properties treatment with jQuery 1.6 by Ivo Stoykov jQuery ( 1.6 introduces .prop() ( and .removeProp() ( methods which allow modifying or removi…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
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…

738 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