CSS,无法在 chrome 中对齐 div

标签 css google-chrome

我在 chrome 中遇到了一些定位的神秘问题。 关于我的一页:http://www.iphonedeksler.no/

右边的 div,带有 class="content",在 chrome 中太低了,但在 firefox 和 IE 中完美。

更神秘的是,当您检查并切换“float:right;”时css 规则关闭,然后再次打开,它会按应有的方式对齐。

这是 chrome 的错误吗,我应该只对 chrome 使用 css hack 吗?

最佳答案

似乎 .main { clear: both; } 搞乱了 .content div 对齐方式。 如果您删除 clear: both,您将解决对齐问题。

关于CSS,无法在 chrome 中对齐 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15254407/

相关文章:

javascript - Bootstrap v4.1 : Closing a collapse menu when clicking outside of div

php - 将 .js 文件中的 JQuery 选择器添加到 .php 中

google-chrome - 单独安装和运行,第二个谷歌浏览器

jquery - 在 Google Chrome 检查器上加载 jQuery 的命令?

javascript - 控制台集成 : get number of errors/warnings thrown?

css - 任何 Javascript 错误期间,Font Awesome 图标都会中断

c# - asp.net:在后面的代码中的 div 之后附加一个 div

html - 响应式媒体查询在 css 中不起作用

jquery - 为文本区域的每一行设置动画

html - 布局无法在 Chrome 中正确呈现