简体   繁体   中英

load77.exelator.com/pixel.gif is causing a white space below the footer

Recently I observed that an image is added dynamically to the site through a script .This is creating a white space beneath the footer.

Code being added dynamically is :

<script type="text/javascript" async="">
    var xl8image = document.createElement("img"); 
    xl8image.src = "http://load77.exelator.com/pixel.gif"; 
    xl8image.width="0"; 
    xl8image.height="0"; 
    document.body.appendChild(xl8image);
</script>

My initial doubts were on chrome extensions I use. When I tested removing extensions, I found that is still there! Also made sure if it is happening in other browsers like IE, Firefox.

Can anyone help me find about removing the white space? My solution does not have this file nor its reference.

Make the element absolutely positioned using position: absolute to remove it from the normal document flow. This will stop it from causing a gap on your page.

New code:

<script type="text/javascript" async="">
  var xl8image = document.createElement("img");
  xl8image.src = "http://load77.exelator.com/pixel.gif";
  xl8image.width = "0";
  xl8image.height = "0";
  xl8image.style.position = "absolute"; //add this
  document.body.appendChild(xl8image);
</script>

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM