Hi I've seen a few ways to control the size of text with JavaScript but I always find the best way to zoom in and out is when I use ctrl - cmd & +/- on responsive layouts.
I quite like how my mobile / tablet layout looks in a browser zoomed in. Is there a way to use JavaScript buttons to actually control the web browser's zoom functionality. So the click of a plus button would have the same effect as ctrl - cmd & +? Rather than mimic the functionality I want it to actually control the browsers zoom functionality.
I've played about with this css and I could use Javascript to increase and decrease the level:
body {
-moz-transform: scale(2);
zoom: 2;
zoom: 200%;
}
but while this does zoom in it also gives horizontal scroll bars and therefore never shows tablet or mobile layouts that I have created.
Is there a way to do it in Javascript? I need it to be cross browser, available to the public and not involve any dev tools.
Thanks
What about responsive layout in chrome dev tools? https://developer.chrome.com/docs/devtools/device-mode/
Then change it to mobile or tablet device then you can zoom in by using:
document.body.style.zoom = "100%";