请大家帮看看这个布局在IE8下面为什么有白边_html/css_WEB-ITnose

我要做一个布局,要求footer始终在页面的最下面。
代码如下:

nbsp;html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

    

CSS Test
    
*
{
margin: 0;
padding: 0;
}
html, body
{
height: 100%;
min-height: 100%;
}
#wrapper
{
min-height: 100%;
background: url(line.png);
position: relative;
margin-bottom: 60px;
display: block;
position: relative;
z-index: 1px;
}
* html #wrapper
{
height: 100%;
}
#footer
{
background: gray;
height: 60px;
margin-top: -120px;
z-index: 2px;
position: relative;
}
#main
{
border: 1px solid red;
display: block;
height: 500px;
padding-bottom: 60px;
padding-bottom: 40px\9; /* ie 8/9*/
padding-bottom: 26px\9\0; /* ie 9*/
}

.clearfix:after
{
content: “.”;
display: block;
height: 0;
clear: both;
visibility: hidden;
}
*html .clearfix
{
height: 1%;
}
* + html .clearfix
{
height: 1%;
}
#header
{
background: blue;
height: 50px;
display: block;
position: relative;
z-index: 1;
}

    
        
        
        
            
                12

                12

                12

                12

                12

                12

                12

                12

                
                12

                12

                12

                12

                12

                12

                12

                12

                
                12

                12

                12

                12

                12

                12

                12

                12

                12

                
            
            
            
            
            
        
    
    
        dafasdf
    

在IE9 chrome firefox 和 safari 下都没有问题,在IE8下面 如果你把浏览器的高度缩小到出滚动条,就会在footer下面出现一个白边,拜托大家帮忙看看。

回复讨论(解决方案)

如果用table布局则兼容所有浏览器,DIV+CSS都流行这么多年了 总不能还让我用table吧

你确定是ie8这样吗?我在ie8下试你的代码如下显示

你看我的那个截图,就是下面的白边,你能再看看你的是IE8吗?我怎么看起来有点像IE7呢。 我用的IE9的兼容模式和IETester测试的。 要IE8真的像你那样就好了啊

我测试IE8的时候 如果没出滚动条的时候footer真好在最下面,一出滚动条就出现白边了。

我的系统是win2003,IE是如假包换的8

难道win7的不一样了,我是win7我郁闷了。

ietest和真实的ie有区别

我用IE8也有问题,最后不管了table搞定

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

点点赞赏,手留余香

给TA打赏
共0人
还没有人赞赏,快来当第一个赞赏的人吧!
    编程技术

    急求高手解决CSS中的png背景图在IE6中透明度的问题!_html/css_WEB-ITnose

    2025-4-4 19:08:08

    编程技术

    路径的疑惑_html/css_WEB-ITnose

    2025-4-4 19:09:02

    0 条回复 A文章作者 M管理员
    欢迎您,新朋友,感谢参与互动!
      暂无讨论,说说你的看法吧
    个人中心
    购物车
    优惠劵
    今日签到
    私信列表
    搜索