Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7824515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:37:26+00:00 2026-06-02T08:37:26+00:00

I tried working on this on CSS and jquery but everything fails. Is there

  • 0

I tried working on this on CSS and jquery but everything fails. Is there a default way to ALWAYS keep the data-role page or content to display in 100% HEIGHT?

Every single time i do a portrait mode and the content inside the data-role=”content” is short, it leaves a nasty white space. please see capture attached.

Please help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T08:37:28+00:00Added an answer on June 2, 2026 at 8:37 am

    You can use jQueryMobile to work out the height of the viewport, then take away the header and footer div heights. You are left with the height you require.

    HTML – for each page

    <body onload="init()">
        <div data-role="page" id="page" data-theme="a">
            <div data-role="header">
                <h1>Header text</h1>
            </div>
            <div class="page-content">
                <div data-role="content">
                    <h1>Content here...</h1>
                </div>
                <div data-role="content">
                    <h1>More content here...</h1>
                </div>
            </div>
            <div data-role="footer">
                <h4>Footer text</h4>
            </div>
        </div>
    </body>
    

    JS

    // Function called when page has loaded
    function init() {
      document.addEventListener("deviceready",onDeviceReady,false);
    }
    
    // Function called when phonegap is ready
    function onDeviceReady() {
        //All pages at least 100% of viewport height
        var viewPortHeight = $(window).height();
        var headerHeight = $('div[data-role="header"]').height();
        var footerHeight = $('div[data-role="footer"]').height();
        var contentHeight = viewPortHeight - headerHeight - footerHeight;
    
        // Set all pages with class="page-content" to be at least contentHeight
        $('div[class="page-content"]').css({'min-height': contentHeight + 'px'});
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This page should display a Google ad. I Tried everything but it's not working.
I tried everything to get this code working, and I hope someone will save
i have tried this code to redirect a php page.but it s not working
What I tried is by adding selected , but this is not working: <select>
This might help someone but its not 100% working. I've tried to stop the
I tried a test file which is working but this file isn't. I also
I have tried and failed to get this working. Basically I am trying to
Im working with the Meteor framework and came by this error when I tried
I am tired of working this out myself , i cannot understand the way
I'm using the jQuery Validation Engine to validate some form fields. Everything's working well

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.