0

创建了一个在 IE6,7 中工作正常的表,但在 FF 中,标题隐藏了第一个数据行。

<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> 

请帮助我可以修改的地方。

-ss

4

2 回答 2

0

为什么会position:absolute在里面?在我的头顶上, pos:abs 将thead消除流量,这会将第一行有效地隐藏起来。可能您可以在第一行使用一些边距/填充来解决此问题,但您必须首先证明 pos:abs 的合理性。

我可以看到的另一件事是所有thead内容都不是td' ths,但我怀疑这会产生这种效果。

编辑:给它一个粗略的测试,它绝对是pos:abs(万恶之根:P)。可能你想要position:fixed吗?另一张海报是对的,你错过了一个tr

于 2009-05-06T15:00:56.427 回答
0

看起来您缺少<tr>顶行中的 。

于 2009-05-06T14:58:35.213 回答