Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to set zoom level using css

I have been developing my webapp with a certain zoom level on firefox that I set initially (using ctrl+wheel). Now when tested on a different PC on firefox, the default 100% seems to be too big. Can I set default using css?

like image 703
prat Avatar asked Jul 21 '10 19:07

prat


People also ask

How do you change the zoom level in HTML?

By default, Chrome sets the zoom level to 100%. To manually adjust the settings, use the Ctrl key and “+” or “-” combos to increase or decrease the page magnification.


1 Answers

    <html>    
        <body>
            <div id="sampleDiv" style="width: 100px; background-color: Gray;">
                Zoom Me
            </div>
            <button onclick="sampleDiv.style.zoom='300%'">Zoom 300%</button>
            <button onclick="sampleDiv.style.zoom='200%'">Zoom 200%</button>
            <button onclick="sampleDiv.style.zoom='100%'">Zoom 100%</button>
        </body>
    </html>
like image 98
zach Avatar answered Oct 31 '22 00:10

zach