Note that there are some explanatory texts on larger screens.

plurals
  1. POSet content full screen with no overflow or scrolling using jQuery mobile
    primarykey
    data
    text
    <p>I'm trying to create a web app using jQuery Mobile. I'm wanting to make a navigation page that consists of 4 buttons filling the entire screen.</p> <p>I'm using the following jQuery to return the screen height, divide it by 4 then apply it to each button. I repeat this on orientation change...</p> <pre><code>var winHeight = window.innerHeight; var buttHeight = winHeight / 4; var winWidth = $(window).width(); $('.fullWidthButton').css({ height: buttHeight, width: winWidth }); $('.ui-mobile-viewport').css({ height: winHeight, width: winWidth }); console.log(winHeight); $('#menu').bind("orientationchange", function () { var winHeight = $(window).height(); var buttHeight = winHeight / 4; var winWidth = $(window).width(); $('.fullWidthButton').css({ height: buttHeight, width: winWidth }); $('.ui-mobile-viewport').css({ height: winHeight, width: winWidth }); }); </code></pre> <p>Here's the web app in progress... <a href="http://mobile.graphitedesign.com/#menu" rel="nofollow">http://mobile.graphitedesign.com/#menu</a></p> <p>If you view this on an iPhone you will notice that there is tiny grey background showing at the bottom when you scroll - not the end of the world but ideally I would like to stop the user from seeing this, all the time having the menu filling the screen. </p> <p>If you rotate the screen, jQuery is doing it's job and adjusting the height of the buttons, but there is a huge grey background now. I've tried everything to remove this but nothing is working.</p> <p>Ideally I would like to disable scrolling completely, but then I lose the address bar.</p> <p>Any pointers would be grateful!</p> <p>Thanks! </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload