jQuery Mobile: Adding padding to popup

This entry is part 62 of 73 in the series jQuery Mobile

In the previous example, we have used the class=’ui-content’ to add 15px to the padding of the popup.

This is also illustrated in this example.

<!DOCTYPE html>
<html>
<head>
    <link href='http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.css' rel='stylesheet'/>
    <script src='http://code.jquery.com/jquery-1.10.2.min.js'></script>
    <script src='http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.js'></script>
    <title>Upwhere</title>
</head>
<body>
<div data-role='page'>
    <div data-role='header' data-theme='b'>
        <h1>Welcome To My Popup App</h1>
    </div>

    <div data-role='content'>
        <a href='#popupPadded' data-rel='popup' class='ui-btn ui-corner-all ui-shadow ui-btn-inline'>Popup with padding</a>
        <div data-role='popup' id='popupPadded' class='ui-content'>
            <p>This is a popup with the <code>ui-content</code> class added to the popup container.</p>
        </div>
    </div>

    <div data-role='footer' data-position='fixed'>
        <h4 style='text-align:center;'>I'm the footer</h4>
    </div>
</div>

</body>
</html>
Try The Code
Series Navigation<< jQuery Mobile: Popup dialog
jQuery Mobile: Closing popups >>