I have a social netowork coded in PHP and css. Ive realized that it looks so much nicer and cleaner when its zoomed out at 90% instead of 100%. Is there a piece of code I can implement into the php or css to make the webpage automatically zoom out when its visited? This is mainly only for the login page.
if you want to take a look at the site, heres the URL: social.flamboyantent.co.uk
Thank you in advance.
If I understood you right. This should work:
<script type="text/javascript">
function zoom() {
document.body.style.zoom = "90%"
}
</script>
<body onload="zoom()">
To add zoom in Firefox read this object.Style.Zoom property not working in Firefox
Last answer will work for major browsers.
<script type="text/javascript">
function zoom() {
document.body.style.zoom = "90%"
}
This is the compatibility chart.
But as stated in THIS QUESTION
You could use the "proprietary" -moz-transform property in Firefox 3.5+.
So you could use:
div.zoomed {
zoom: 3;
-moz-transform: scale(3);
-moz-transform-origin: 0 0;
}
And there´s also a BUGZILLA ticket.
Uhh wanted to stop my laptops anoying 125% zoom. Placed the JS and dreamweaver zooms out like your code suggests: But Microsoft Edge and Firefox ignore the code completely :(
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.