Take the 2-minute tour ×

I used jQuery mobile and added popup on leftmost button but the popup window is not centered as to screen it gets left padding more.

Popup dialog is not centered in portrait mode in android mode I have used the code from this link to generate popup dialog button from this

share|improve this question

1 Answer 1

up vote 0 down vote accepted

It's unclear as to what problem you're having, but to center the dialog on the window, just use data-position-to="window" like this:

<a href="#positionWindow" data-rel="popup" data-position-to="window">

<div data-role="popup" id="positionWindow">
    <p>I am positioned to the window.</p>
share|improve this answer

Your Answer


