Is there a way to achieve a scrollable nested div on a jQuery mobile site? I am aiming for a fixed header and footer with the middle section being scrollable. Despite my attempts to set overflow:scroll (along with specifying the width and height of the div), it does not seem to function properly on my iOS simulator. Unfortunately, I cannot provide a jsFiddle demonstration as it does not support jQuery mobile elements.
Below is the HTML code snippet:
<body>
<div data-role="page">
<div data-role="header">
<div id="header_image">
<img src="images/top_logo.png" />
</div>
</div><!-- /header -->
<div id="content_bg">
<div data-role="content">
<p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div><!-- /content -->
</div><!-- /content_bg -->
<div data-role="footer" data-theme="b">
<div id="footer_text">
<center><h4>Page Footer</h4></center>
</div><!-- /footer_text -->
</div><!-- /footer -->
</div><!-- /page -->
Here's the relevant CSS for the issue:
#content_bg{
background-color:#0038a5;
height:310px;
width:100%;
text-size:11px;
color:white;
overflow: scroll;
}
Your insights into resolving this problem would be greatly appreciated!