Unusual scrolling behavior in iOS 7 when using PhoneGap and jQuery Mobile

I am currently working on a simple app that includes a list of elements within a page. I am utilizing PhoneGap in conjunction with jQueryMobile for this project. After testing both the jQuery Mobile Listview and a custom list implementation, I have encountered a common issue.

They say a picture is worth a thousand words...

As depicted in the image, the header remains fixed and displayed above the status bar. However, when scrolling through the list, the elements end up overlapping the phone's status bar. Ideally, I would like the elements to be hidden under the header, similar to how it appears in standard iOS lists.

Is there a way to achieve this desired effect?

Below is the relevant section of CSS code:

[data-role=header]{
  z-index:100;
  width:100%;
  position:fixed;
}

/*
 * iOS7 NavBar Margin
 */
.myMarginClass
{
  margin-top : 20px;
}

.myMarginClass > [data-role=header]{
  z-index:100;
  width:100%;
  position:fixed;
}

.myMarginClass > [data-role=content]{   
  position:relative;
  top:40px;
}

The corresponding HTML structure:

<div data-role="page" class="myMarginClass" id="docListPage">
  <div data-role="header">
    [...]
  </div>

  <div data-role="content">
    [...]
  </div>
  <div data-role="footer" data-position="fixed" data-tap-toggle="false">
    [...]
  </div>
</div>

Your assistance is greatly appreciated. Regards, Rik.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Add flair to the ButtonBase element within a Tab component

I'm currently exploring how to override Material UI styles with a nested component. For instance, what if I want to increase the bottom border height on an active Tab, which is applied by the underlying ButtonBase. Below is the style definition: con ...

"Troubleshooting: Why isn't my Tailwindcss box shadow

I'm currently incorporating Tailwindcss into a React project to recreate the Star Wars website mobile menu. However, I am facing an issue where the box shadow added to the hamburger icon segments is not visible when the navigation drawer is opened. A ...

The alignment of Bootstrap text is not in alignment

Hi there, I am pretty new to bootstrap and have been hunting for a solution regarding this specific layout that I want to achieve. Check out the image below: https://i.sstatic.net/qqaCo.png The issue I am facing is that in my code, the name, code, status, ...

Accessing an image within a label using Jquery

I'm struggling with accessing the img tag when a specific checkbox is selected in order to add a particular class. I need help figuring out how to target the img tag. <div class="row "> <div class="col-md-5 col-md-offset-1 col-centered ...

Creating a visually appealing lineup of images with CSS3 and optimal methods

Hey there, I'm diving into the world of HTML5 and CSS3 and feeling a bit lost. Can't seem to find the right solution for what should be a simple task. My goal is to create a line of clickable images/links on my website similar to how Stack Overfl ...

Showcase text in a straight row by utilizing ng-repeat and bootstrap

My goal is to show each word on a new line, similar to how words are displayed in a hangman game. The words should be displayed as blanks. <body ng-init="models = [['H','a','p','p','y'],['X',& ...

Align the content evenly on several cards using Material-UI

Trying to work on some frontend coding, but struggling with getting the content justified properly in fixed-height MUI cards. Each card consists of a title, description, divider, and author, but I can't seem to get everything aligned correctly within ...

Failure to apply CSS to the class element instead of the div tag

Looking to update the CSS code below to change the color of a div to blue when it matches a specific class: I attempted the following changes, but they did not produce the desired result: &__header { display: flex; justify-content: space-betw ...

Ensuring that all of the content is adaptable across various devices, from smartphones to high-definition 1080p screens

I am currently working on making my entire content responsive. While I have successfully made the background responsive using different @media resolutions, I am facing an issue with the image in the foreground that is not scaling accordingly. I tried putti ...

Vertical stacks of DIVs suddenly vanish

I am currently creating a map grid using HTML/CSS with the following layout: #map { position: absolute; top: 2vw; bottom: 2vw; left: 2vw; right: 2vw; overflow: visible; background : blue; } .map-row { width: 100%; ba ...

"How to change the hover background of a select element in Chrome from its default setting to something else

https://i.sstatic.net/G2deM.png Is there a way to remove the background color on hover and replace it with a different color? .drp-policydetails { border: 1px solid #dddddd; background-color: #ffffff; } <div className="form-group"> <sele ...

What is the method for displaying the delete icon, a child component located within the Menu Item, upon hovering over it using Material UI CSS syntax?

My goal is to display the delete icon when hovering over a specific menu item that is being mapped using the map function. The desired functionality is for the delete icon to appear on the corresponding menu item when it is hovered over. I attempted to i ...

Discover the nearest class and smoothly expand it with the slideDown function in jQuery

Hey there, I'm working on implementing a "View More" button on my page. The button will reveal another unordered list that currently has the class of "hidden-list". When the user clicks on "View More", I want it to slideToggle the hidden-list element ...

Navbar not updating active section in Scrollspy

The scrollspy active section is not updating on the navbar. I'm unsure if there is a missing script or if there is an error in the code. Script /* Navbar Spyscroll */ $('body').scrollspy({ target: '#navspy' }) $(&apos ...

Is there a substitute for using CSS divs with display:table?

<div id="wr"> <div id="con"> <div id="unknownWidth">some box with unknown width</div> </div> <div id="knownWidth"></div> </div> #wr { width:300px; height:100px; border:1px sol ...

Is it possible to modify the background color of a select option menu when hovering over it?

It turns out that the default background color of the select option menu changes to blue when it is hovered over. However, I would like to personalize and adjust it to my preference using Bootstrap 5 and CSS. Any assistance with this customization would ...

Minimize the use of globalized variables in your LESS CSS code

Is there a better way to avoid using globally diffused variables? I conducted a test with the following setup: _import.less @test: #FFF; _import2.less @test: #000; test.less @import (reference) "_import"; body { background: @test; } test2.less ...

providing the context for the hover title description

I seem to be struggling with a seemingly simple issue and can't find a solution. Below is the code I have written: <html> <head> <style> span.dropt { border-bottom: thin dotted; background:white; } </style> </head> ...

Ways to eliminate flickering when dynamically updating iframe content

Currently, I am in the process of constructing an iframe slideshow that consists of 7 webpages named event1.html to event7.html. To implement the automatic changing of the iframe source every 1 second, I am utilizing setInterval. However, I am facing an is ...

CSS card with border and a cut-out in the top-right corner

Looking to create a div with a gray border that is 20px thick all around. I also want a cut out in the top right corner of the div, with the rest of the borders matching the thickness. The cut out should be transparent. Here is my attempt: http://jsfiddl ...