I am using JQuery UI and would like to position my dialog horizontally centered but vertically above center, maybe by a fixed amount of pixels or a relative distance from th
apply css into your #dialog-form use % sample
if width = 1000
put
left:50% margin-left:-500px;
to make it centered. or you can use iframe.
If anyone is creating a link that opens a jQuery dialog due to the link's class having a click event handler, you may notice that it might jump to the top of the page but create the modal dialog deeper down the page and you have to scroll to it.
If anyone is just trying to stop the jQuery dialog from jumping to the top, wanting it to stay near the link you clicked, just remove href
. Nearly went mad trying to solve this. The HTML5 specification apparently understands href=""
or href="#"
to mean move to the top.