html - Firefox 不以表 :middle; 为中心

标签 html css firefox cross-browser

标题在 Safari 和 Chrome 中正确居中,但在 Firefox 中不正确:link to my site

http://wisercoder.com/firefox-displaytable-cell-and-absolute-positioning/状态:

"Firefox doesn’t support a combination of display:table-cell and position:relative"

这与问题有什么关系吗?是否有用于将标题居中的 Firefox 修复程序?

该网站是响应式的,因此 table:middle; 解决方案很棒,因为您不必设置高度。

最佳答案

我知道的唯一解决方案是用另一个 div 包装具有 display:table-cell 的 div 并使他相对于原始位置而不是原始位置。帮助了我。

找到原题:link

关于html - Firefox 不以表 :middle; 为中心,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21648306/

相关文章:

javascript - 无法在 :checked pseudo code with selector in CSS 中使用多个 ':nth-child'

javascript - appendTo 插入窗口并向下滚动?

html - 字体图标后垂直对齐文本

html - 优化首屏 CSS

php - 如何更改 "post comment"按钮上的文本?

javascript - 获取 <a> 链接的值?

html - 高度为 100% 的 2 列布局

java - 在 Java 中呈现 HTML

javascript - 从引导扩展绘制 UI 覆盖

css - 我需要将输入元素调整为表格单元格宽度