2009-05-06 2 views
0

IE6,7에서는 정상적으로 작동하지만, FF에서는 헤더가 첫 번째 데이터row를 숨 깁니다.IE에서 표 머리글로 겹쳐진 테이블의 첫 번째 레코드

<g:if test="${params.history!=null}"> 
<div style="width:791px;padding-bottom:10px;overflow-y:auto;${(lstDNCallEntries.size()>0)?'height:100px':''}"> 
<table class="table"> 
<thead style="position: absolute;"> 
<% params=params.findAll{ k,v -> k != 'sort'} %> 
<td class="certify_head" width="87" style="text-align: center">title</td> 
<td class="certify_head" width="89" style="text-align: center" >action</td> 
      <td class="certify_head" width="66" style="text-align: center" >list</td> 
      <td class="certify_head" width="118" style="text-align: center" >selection</td> 
      <td class="certify_head" width="110" style="text-align: center" >source</td> 
      <td class="certify_head" width="64" style="text-align: center" >${message(code:'phoneoptoutgranularity.gsp~title.user')}</td> 
      <td class="certify_head" width="82" style="text-align: center" >Office</td> 
      <td class="certify_head" width="90" style="text-align: center" >Effective Date</td> 
     </thead> 
     <tbody class="scrollContent"> 
      <g:if test="${lstDNCallEntries.size() > 0}"> 
       <g:each in="${lstDNCallEntries}" var="phoneHistory" status="i"> 
        <tr class="${(i % 2) == 0 ? 'normalRow' : 'alternateRow'}" 
          onMouseOver="this.style.backgroundColor='#ffffd9'" 
          onMouseOut="this.style.backgroundColor=''"> 
         <td width="90" align="center" valign="center">${phoneHistory.date}</td> 
         <td width="92" valign="center" style="font: normal 12px Arial, Helvetica, sans-serif;">${phoneHistory.action}</td> 
         <td width="71" align="center" valign="center">${phoneHistory.list}</td> 
         <td width="122" align="center" valign="center">${phoneHistory.preferencekey}</td> 
         <td width="110" align="center" valign="center">${phoneHistory.source}</td> 
         <td width="69" align="center" valign="center">${phoneHistory.user}</td> 
         <td width="85" align="center" valign="center">${phoneHistory.office}</td> 
         <td width="90" align="center" valign="center">${phoneHistory.effectiveDate}</td> 
        </tr> 
       </g:each> 
      </g:if> 
      <g:else> 
       <tr> 
        <b> 
        <td colspan="7" width="770" align="center"><b><g:message 
         code="phoneoptoutgranularity.gsp~historydetails" /></b></td> 
        </b> 
       </tr> 
      </g:else> 
     </tbody> 
    </table> 
    </div> 
</g:if> 

어디서 수정할 수 있습니까? 당신이 당신의 맨 윗줄에 <tr> 누락있는 것처럼

-ss

+0

코드를 읽을 수 있도록 포맷하십시오. – Keltex

답변

0

position:absolute이 있습니까? 내 머리 꼭대기에서 pos : abs는 thead을 걸러내어 첫 번째 줄을 효과적으로 숨길 것입니다. 아마 당신은 첫 번째 행의 여백/패딩으로 이것을 고칠 수 있지만 pos : abs를 먼저 정당화해야합니다.

내가 볼 수있는 또 다른 사실은 thead의 내용이 모두 td이 아니며 th의 것이 아니라는 것입니다.하지만이 효과가 발생하는지는 의심 스럽습니다.

편집 : 거친 테스트를 준 결과, 분명히 pos : abs (모든 악의 뿌리 : P)입니다. 대체로 position:fixed을 대신 사용 하시겠습니까? 다른 포스터가 맞습니다. 누락되었습니다. tr

관련 문제