Fixed position in mobile browser for footer

Good day, I have a meta like this

<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalabale=no, width=device-width, height=device-height" />

Now I can get the height port with js. I want to use it to change the footer so that it always stays at the bottom of the screen using fixed positioning. here is the css footer

#footer
{
height:30px;
background-color:#D9D9D9;
background-image:url(../images/footer.png);
background-repeat:repeat-x;
margin-top:20px;
width:100%;
/*bottom:0;
position:fixed;*/
}

how do I change this footer using JS to get the right thing. Thank. @cyberomin.

+3
source share
4 answers
document.getElementById("footer").style.position = "fixed";
0
source
+1
source
0

: Android 2.2.

, IPhone, , : JavaScript Wink. WebApps, ( API). Scroller.

0

Source: https://habr.com/ru/post/1777903/


All Articles