채택완료

html 스크롤 헤더 테이블 고정

2014-12-24 (수) 09:08:45 19,729

<div class="co_wrapper" style="overflow: auto; overflow-x:hidden; width: 740px; height: 550px;">

    <table id="list-table" class="table_wrap">
<colgroup>
<col width="75px"/>
<col width="65px"/>
<col width="65px"/>
<col width="*"/>
<col width="153px"/>
</colgroup>
<thead>
<tr>
<th>No</th>
<th>Type_A</th>
<th>Type_B</th>
            <th>Type_C</th>
            <th>Type_D</th>
        </tr>
</thead>
<tbody > </tbody>
</table>

</div> 

 

스크롤 내릴때 헤더 부분을 고정 시키고 싶습니다.

div이를 나눠야 될거 같은데.. 어떻게 해야하죠..?

고정시키고 싶은 부분은

            <th>No</th>

            <th>Type_A</th>
<th>Type_B</th>
            <th>Type_C</th>
            <th>Type_D</th>

이 구문입니다!

고수님들 부탁드립니다!

|

답변 1개

채택된 답변
+20 포인트

테이블의 헤더나 푸터를 고정하는 JQuery입니다. 

http://www.fixedheadertable.com/ 

답변을 작성하려면 로그인이 필요합니다.