The following page has some useful information about zooming in using css/javascript:
How can I scale an entire web page with CSS?
However, when I try to implement it it works better for chrome than firefox, as firefox moves my content to the top of the screen and causes (horizontal) overflow problems:
var current_zoom = 1;
function zoom_in(){
current_zoom += .1;
document.body.style.zoom = current_zoom;
document.body.style.MozTransform = "scale(" + current_zoom + ")";
}
function zoom_out(){
current_zoom -= .1;
document.body.style.zoom = current_zoom;
document.body.style.MozTransform = "scale(" + current_zoom + ")";
}
document.getElementById("zoom_in_btn").onclick = zoom_in;
document.getElementById("zoom_out_btn").onclick = zoom_out;
#calibration_card{
position: absolute;
top:0;
bottom: 0;
left: 0;
right: 0;
margin:auto;
width:310px;
height:190px;
padding:5px;
border-style: solid;
border-radius: 20px;
color:red;
}
<div id="calibration_card">
<div>Please zoom in or out until the card on the screen is the same size as a typical card in your wallet by pressing the + and - buttons below</div>
<div>Please do not use a bank card or driving license for this sort of check</div>
<div>Once the screen card is as close as possible to your card, please press "Proceed"</div>
<button class="btn btn-primary" id="zoom_in_btn">+</button>
<button class="btn btn-primary" id="zoom_out_btn">-</button>
<button class="btn btn-primary" onclick="Trial.submit()">Proceed</button>
</div>
<input type="hidden" id="calibration_zoom" name="calibration_zoom"/>
Are there simple fixes for firefox?