Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to center my dialog window inside a div?

Posted on 2013-05-10
2
Medium Priority
?
208 Views
Last Modified: 2013-05-13
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?
0
Comment
Question by:hidrau
2 Comments
 
LVL 83

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 39156714
.dialog({ position:  { my: "center", at: "center", of: "#container" } });
0
 
LVL 1

Author Closing Comment

by:hidrau
ID: 39161095
thanks very much friend
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
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)
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…

876 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