首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >IE中与表头重叠的表中的第一条记录

IE中与表头重叠的表中的第一条记录
EN

Stack Overflow用户
提问于 2009-05-06 14:41:02
回答 2查看 140关注 0票数 0

创建了一个在IE6,7中运行良好的表,但在FF中,头隐藏了第一个数据行。

代码语言:javascript
复制
<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

EN

回答 2

Stack Overflow用户

发布于 2009-05-06 14:58:35

看起来你错过了你的第一行的<tr>

票数 0
EN

Stack Overflow用户

发布于 2009-05-06 15:00:56

为什么position:absolute会在里面?在我的头顶上,pos:abs将把thead从流中取出,这将使第一行向上凸起,有效地隐藏它。也许你可以在第一行用一些边距/填充来解决这个问题,但你必须首先对齐pos:abs。

我能看到的另一件事是,所有的thead内容都是td的,而不是th的,但我怀疑这是否会产生这种效果。

编辑:给了它一个粗略的测试,它肯定是pos:abs (所有邪恶的根源:P)。也许你想换成position:fixed?另一张海报是对的,你少了一个tr

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/829943

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档