Browser zoom does not work with my CSS

4

I have inside the body tag 3 divs with height defined in pixels and width in percentage. When the person types in CTRL + browsers zoom in up to 500%.

My problem is that zooming does not work.

I tried to define, in the body tag and in the 3 ids defined in the 3 divs: top, body and footer. In my case I set overflow-y to scroll and divs with min-width and width 100 and max-width 500% but it's not solving.

<body>
    <div id="todo">
        <div id="topo"></div>
        <div id="corpo">
        </div>
        <div id="rodape"></div>
    </div>
</body>

CSS:

/* 
    Created on : 31/05/2014, 23:25:56
    Author     : willian
*/

body {
    margin: 0;
    padding: 0;
    min-width: 100%;
    width: 100%;
    max-width: 500%;
    overflow-x: scroll;
}

#todo {
    margin: 0;
    padding: 0;
    min-width: 100%;
    width: 100%;
    max-width: 500%;
    overflow-x: auto;
}

#topo {
    margin: 0;
    padding: 0;
    height: 200px;
    min-width: 100%;
    max-width: 500%;
    background: #fefcda;
    overflow-x:auto;
}
#corpo {
    margin: 0;
    padding: 0;    
    height: 800px;
    min-width: 100%;
    max-width: 500%;
    background: #faf9ed;
    overflow-x: auto;
}
#rodape {
    margin: 0;
    padding: 0;    
    height: 300px;
    min-width: 100%;
    max-width: 500%;
    background: #fefcda;
    overflow-x: auto;
}
    
asked by anonymous 01.06.2014 / 05:52

1 answer

3

Via CSS you have no control over the browser's ability to do or not to do page enlargement.

This type of information is passed to browsers by means of META TAGS placed in the <head></head> section where we can give instructions of the sort:

<meta name='viewport'
      content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' />

Here, you can indicate that the page starts at the scale of 1 and the maximum it can go to is 1, thus disabling the zoom function in the browser.

Note:

user-scalable=0  (não deixa o utilizador fazer zoom)
user-scalable=1  (deixa o utilizador fazer zoom)
    
28.06.2014 / 23:38