Issue to scroll tbody on IE 9 (tbody's height = height-line)

前端 未结 2 1663
-上瘾入骨i
-上瘾入骨i 2021-01-20 00:28

Sorry for my bad English, I hope you\'re going to understand what I want to say...

I\'m trying to implement an HTML table which support scrolling of table bodies ind

2条回答
  •  北海茫月
    2021-01-20 00:34

    I have slightly tried to fix it. Hope it gives some idea

    HTML

    Problem

    Solution

    CSS

    p {margin:0 0 1em}
    table p {margin :0}
    .wrap {
        margin:50px 0 0 2%;
        float:left;
        position:relative;
        height:200px;
        overflow:hidden;
        padding:25px 0 0;
        border:1px solid #000;
    width:150px
    }
    .inner {
        padding:0 ; 
        height:200px;
        overflow:auto;
    }    
    table {  margin:0 0 0 -1px; border-collapse:collapse; width:130px}
    td {
        padding:5px;
        border:1px solid #000;
        text-align:center;    
    }
    thead th {
        font-weight:bold;
        text-align:center;
        border:1px solid #000;
        padding:0 ;    
        color:#000;
    }
    thead th {border:none;}
    thead tr p {  position:absolute;   top:0;    }
    .last { padding-right:15px!important; }​
    

    Demo http://jsfiddle.net/nyCKE/272/

提交回复
热议问题