As I work on my HTML5 jQuery Mobile cordova mobile app, I find myself dedicating time to placing text on an image with responsive design for mobile devices.
Shown here is the sample screen on a smaller device.
https://i.sstatic.net/48Cwx.jpg
This is how the sample screen appears on a larger device.
https://i.sstatic.net/zmZLG.jpg
I aim to position the text Some Text
at the bottom center of the image while ensuring it adjusts responsively.
Below is the jQuery Mobile code that generates the image and text.
<div class="ui-block-a">
<div class="ui-bar" style="padding:5px">
<img style="height: 100%;width:100%" src='img/book150.png'/>
<p id="text">Some Text</p>
</div>
</div>
I have attempted using the following CSS style, which only works when the image size remains constant:
#text {
z-index: 100;
position: absolute;
left: 150px;
top: 350px;
}