Search code examples
androidhtmlcssmobilebanner

Bottom page Privacy banner is jumping underneath page bottom on Android


Can i ask what the issue is why my div with bottom:0; is jumping to what looks like bottom:-5; on Android devices. See image below:

Banner issue:

enter image description here

.alert {
  padding: 20px;
  background-color:#0c4105;
  color: white;
  position: fixed; 
  bottom: 0;
  left: 0;
   width:100%;
}

@media only screen and (max-width: 800px) {
  .alert {
  width:100%;
  bottom: 0.11111px;
}
}

.conbtn {
  margin-left: 15px;
  color: white;
  font-weight: bold;
  float: right;
  font-size: 22px;
  line-height: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.conbtn:hover {
  color: black;
}

Solution

  • This issue was fixed by adding minimum and maximum scales in the viewport.

    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0">