Reputation: 4313
Some web users may require larger fonts than the norm due to issues with their eyesight, and whilst traditionally designers may have implemented script that would resize text at the click of a button, browsers now have very handy zoom functions that work much more nicely to magnify an entire page and don't tend to create layout issues for developers.
Not all web users may be aware of these functions in their browsers or how to access them, so I was wondering if it's possible to add a zoom button to a website which controls the browser's zoom functionality, simplifying the user experience.
So, is it possible? Is it even a good idea?
Upvotes: 0
Views: 146
Reputation: 360602
You can do it via CSS on the body tag:
body {
zoom: 200%;
}
Some simple javascript to increase/decrease the zoom level, and you've basically replicated the browser's "bigger/smaller" buttons.
Upvotes: 1