jQuery Mobile Dialog Page - Fixed Position Header

Playforward

I can get fixed headers to work correctly on other pages but when I try to do it in a page that has data-dialog="true" it doesn't seem to work. Is this a limitation of the dialog box?

Note that I'm using the following CSS to allow for tall scrollable dialogs:

.ui-dialog-contain {
    max-height: 500px;
    overflow:hidden;
    overflow-y: scroll;
}

My Code is as follows:

<div data-role="page" data-dialog="true" id="dialog_page" >

    <div data-role="header">
        <h1>Header</h1>
    </div><!-- /header -->

    <div role="main" class="ui-content">
        <!-- lots of content removed -->
    </div><!-- /content -->

</div>
ezanker

You can set the max height and scrolling of the content div instead of the entire dialog:

.ui-dialog-contain .ui-content{
    max-height: 450px;
    overflow:hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

Here is a DEMO

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Jquery Mobile - jumping fixed header after closing dialog (firefox)

From Dev

Stop header footer from loosing position:fixed with click - Jquery Mobile

From Dev

Fixed Header hidden on JQuery Steps page (only on certain mobile browser)

From Dev

jQuery mobile fixed header on PhoneGap

From Dev

JQuery Mobile Dialog page not working

From Dev

How to change fixed header in jquery mobile dynamically

From Dev

Why section of web page overlaps the header even if the position of header is fixed

From Dev

disappearing position fixed header in ios7 mobile safari

From Dev

JQuery Position:Fixed 'NAVBAR' by scrolling the page

From Dev

JQuery Position:Fixed 'NAVBAR' by scrolling the page

From Dev

Fixed position div causes page to be truncated in less common mobile browsers

From Dev

jQuery UI dialog goes offscreen when using position fixed

From Dev

Header Div position fixed on top of page but on load show a div on top of it

From Dev

fixed position header overlapping

From Dev

Fixed position not working for header

From Dev

jQuery mobile: change text header/footer remove fixed property

From Dev

Jquery mobile app header showing in full page in some mobile phones

From Dev

jQuery Mobile 1.4.3 fixed toolbar and page content issue

From Dev

position: fixed overlapping page

From Dev

Position fixed not working in mobile browser

From Dev

Change a header's position from fixed to relative on opening (active) mobile drop down menu?

From Dev

Header is disappearing when the position is fixed

From Dev

Scroll to anchor position with fixed header

From Dev

"position:fixed" Not Working For Header Menu

From Dev

Dialog popup jQuery Mobile

From Dev

jQuery Mobile 1.4.0: dynamically change header and title of a page

From Dev

Dynamically change header button icon on page change, jQuery mobile 1.4.5

From Dev

Dynamically change header button icon on page change, jQuery mobile 1.4.5

From Dev

Back to last scrolled position - jquery mobile page design

Related Related

  1. 1

    Jquery Mobile - jumping fixed header after closing dialog (firefox)

  2. 2

    Stop header footer from loosing position:fixed with click - Jquery Mobile

  3. 3

    Fixed Header hidden on JQuery Steps page (only on certain mobile browser)

  4. 4

    jQuery mobile fixed header on PhoneGap

  5. 5

    JQuery Mobile Dialog page not working

  6. 6

    How to change fixed header in jquery mobile dynamically

  7. 7

    Why section of web page overlaps the header even if the position of header is fixed

  8. 8

    disappearing position fixed header in ios7 mobile safari

  9. 9

    JQuery Position:Fixed 'NAVBAR' by scrolling the page

  10. 10

    JQuery Position:Fixed 'NAVBAR' by scrolling the page

  11. 11

    Fixed position div causes page to be truncated in less common mobile browsers

  12. 12

    jQuery UI dialog goes offscreen when using position fixed

  13. 13

    Header Div position fixed on top of page but on load show a div on top of it

  14. 14

    fixed position header overlapping

  15. 15

    Fixed position not working for header

  16. 16

    jQuery mobile: change text header/footer remove fixed property

  17. 17

    Jquery mobile app header showing in full page in some mobile phones

  18. 18

    jQuery Mobile 1.4.3 fixed toolbar and page content issue

  19. 19

    position: fixed overlapping page

  20. 20

    Position fixed not working in mobile browser

  21. 21

    Change a header's position from fixed to relative on opening (active) mobile drop down menu?

  22. 22

    Header is disappearing when the position is fixed

  23. 23

    Scroll to anchor position with fixed header

  24. 24

    "position:fixed" Not Working For Header Menu

  25. 25

    Dialog popup jQuery Mobile

  26. 26

    jQuery Mobile 1.4.0: dynamically change header and title of a page

  27. 27

    Dynamically change header button icon on page change, jQuery mobile 1.4.5

  28. 28

    Dynamically change header button icon on page change, jQuery mobile 1.4.5

  29. 29

    Back to last scrolled position - jquery mobile page design

HotTag

Archive