2013-10-12 2 views
0

HTML 파일을 작성 중입니다. 표를 작성 중입니다. 나는 표의 머리말이 고쳐 져야하고 표제를위한 테이블의 나머지를 위해 스크롤해야한다. 다음 코드를 사용하고 있습니다. 나에게 최선의 대안을 제안하십시오.css를 사용하여 html 표에서 표제를 수정하는 방법

<!DOCTYPE html> 
<html> 
<head> 
<style type="text/css"> 
.underDiv{ 
overflow:hidden; 
width:50px; 
height:150px; 
background-color:#FF00FF; 
position:relative; 
z-index:1; 
} 

.overflowDiv{ 
z-index:4; 
position:absolute; 
left:25px; 
top:25px; 
height:50px; 
width:50px; 
background-color:#00FF00; 
} 
</style> 

</head> 

<body> 
    <table> 
    <div> 
    <div class="underDiv"> 
    <th>Roll no</th> 
    <th> Name</th> 
    </div> 
    <div class="overflowDiv"> 
    <tr> 
    <td>4085</td> 
    <td>john</td> 
    </tr> 
    </div> 
    </table> 
    </body> 
    </html> 

답변

관련 문제