I have a button in my hybrid mobile app which when viewed on an iphone 5 is in the area i want it (middle centre).
When i view it on a iphone 6 plus it moves around, now i know this is because of my css which is very specific but i was wondering if i could get some guidance how i can position a button which remains the same between devices (same location).
This is my css, all help appreciated :)
#divheader {
position: relative;
}
#btn {
position:absolute;
left: 10px;
top: 198px;
text-align: center;
color: #171e28;
background-color: #f4af03;
border-color: #ee9f05
}
HTML
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<link href="kendo/styles/kendo.mobile.all.min.css" rel="stylesheet" />
<link href="kendo/styles/StyleSheet.css" rel="stylesheet" />
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.common.min.css" />
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.default.min.css" />
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.dataviz.min.css" />
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.dataviz.default.min.css" />
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.mobile.all.min.css" />
<script src="http://cdn.kendostatic.com/2014.3.1411/js/jquery.min.js"></script>
<script src="http://cdn.kendostatic.com/2014.3.1411/js/kendo.all.min.js"></script>
<body>
<body>
<div data-role="view" style="background-color: #212a33" id = "divheader" data-title="Blocks">
<div data-role="navbar" id="test">
<span data-role="view-title">My View Title</span>
</div>
<div style="background-color: #212a33">
<div id=test3>
<span class="description" id="test4">Currently in stock:</span>
<input id="numeric" type="number" value="17" min="0" max="100" step="1" />
</div>
<a id="btn" data-role="button" data-click="onClick" align="center" style="margin: 0 auto; width: 300px;" >Click me!</a>
</div>
<div id="test2">
</div>
</div>
</div>
<script>
// the content of the document.body is used by default
var app = new kendo.mobile.Application();
</script>
<script type="text/javascript">
var div = document.getElementById('test2');
div.style.height = document.body.clientHeight + 'px';
</script>
</body>
</body>
</html>