html - 静态 header 在 Firefox 中覆盖正文,在 IE 中不是静态的

标签 html css html-table

告诉它保持静态的 CSS

#fruko {
            position: fixed;
        }
        #links {
            position: fixed;
        }

Div标签所在的HTML

<td width="225px"><div id="fruko"><p><a href="#top" style="text-decoration: none"><font color="Red" size="8">Fruko, inc.</font></a></p></div></td>
        <td><div id="links"><table border="5" cellpadding="5" cellspacing="0" width="100%">
                <tr>
                    <td align="center"><a href="#apps" style="text-decoration: none"><font size="6" color="Red">Apps</font></a></td>
                    <td align="center"><a href="#programs" style="text-decoration: none"><font size="6" color="Red">Programs</font></a></td>
                    <td align="center"><a href="#webs" style="text-decoration: none"><font size="6" color="Red">Websites</font></a></td>
                    <td align="center"><a href="#news" style="text-decoration: none"><font size="6" color="Red">News</font></a></td>
                    <td align="center"><a href="#social" style="text-decoration: none"><font size="6" color="Red">Social</font></a></td>
                    <td align="center"><a href="#about" style="text-decoration: none"><font size="6" color="Red">About</font></a></td>
                </tr>
            </table>
        </div></td>

顶部主表旁边的表在 Firefox 中不会拉伸(stretch),但在 IE 中会拉伸(stretch)。

自己测试一下here .

最佳答案

您可以使用 Internet Explorer 条件注释加载专门为 IE 定制的样式。

http://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx

这并不能解决应该普遍使用跨浏览器 CSS 的问题的根源,但它确实有效地满足了诸如此类的需求。

关于html - 静态 header 在 Firefox 中覆盖正文,在 IE 中不是静态的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9346064/

相关文章:

php - 页面需要两次刷新表数据来更新PHP+HTML

css - 用空格而不是逗号分隔的多个 ID 选择器

html - 当表格垂直扩展到最大高度时 - 使元素在下一个表格单元格列中弹出

python - 使用 BeautifulSoup 与基本表的选项 - 无类 ID,

jquery - 点击滑出菜单栏

javascript - 通过 jquery 设置最小高度

html - 内容 div 中的填充问题

css - 如何在 css 中有条件地应用样式

css - Style Identity 服务器 header 部分

javascript - 获取 jQuery 创建的表格中某一列中所有单元格的数据