开发者

weird footer space apperas from nowhere... IE7 problems

开发者 https://www.devze.com 2023-03-18 05:00 出处:网络
I\'ve problem with ie7, for some reason, strange extra space appears near the footer. Could you help me diagnose this issue?

I've problem with ie7, for some reason, strange extra space appears near the footer.

Could you help me diagnose this issue?

I wasted two days trying to do something...

See it in action here: http://artvard.co开发者_如何学运维m/category.html

Footer is kind of a sticky version.


I suspect this bit of code at the end is causing your issue. I think IE7 thinks there might be some HTML to be rendered there:

<script>
    (function(d, t) {
        var g = d.createElement(t),
    s = d.getElementsByTagName(t)[0];
        g.async = true;
        g.src = 'https://apis.google.com/js/plusone.js';
        s.parentNode.insertBefore(g, s);
     })(document, 'script');
</script>

A nice trick with JavaScript is that you can wrap HTML comments around it and it still functions as JavaScript without affecting your HTML layout. I personally use it to get around xHTML validation, but it may help you here too:

<!--
    <script>
        (function(d, t) {
            var g = d.createElement(t),
        s = d.getElementsByTagName(t)[0];
            g.async = true;
            g.src = 'https://apis.google.com/js/plusone.js';
            s.parentNode.insertBefore(g, s);
         })(document, 'script');
    </script> 
-->

This may not be your answer, but it is worth a shot.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号