【问题标题】:CSS weirdness in firefox - float left not floating left, unless large width is usedFirefox中的CSS怪异-向左浮动而不向左浮动,除非使用大宽度
【发布时间】:2013-07-30 01:43:11
【问题描述】:

我有问题

 #column-left {
     float: left;
     width: 350px;
 }

会向左浮动,但是当我缩小宽度时

有了这个: #column-left { float: left; width: 250px; }

它不起作用。这两种形式都可以在 chrome 中使用,但不能在 Firefox 中使用。有什么想法吗?

这里有一些图片来说明:http://imgur.com/a/v0uIZ

【问题讨论】:

标签: html css firefox google-chrome


【解决方案1】:

如下更新您的 CSS 代码。

#column-left 中删除float: left;width: 350px;

position: absolute; 添加到#column-left

margin-left: 220px; 更改为#content

这会变魔术。在 Firefox 和 Google Chrome 上测试。

【讨论】:

  • 实现梦想。干杯!你能告诉我为什么我原来的 CSS 不起作用吗?
  • 您的网站宽度不固定。您将其设置为auto。所以元素会在屏幕上流动。即,不同的屏幕分辨率为您带来不同的布局。那可能是你的问题。没有把握。 :)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-04-16
  • 2018-08-08
  • 1970-01-01
  • 2022-08-13
  • 2014-02-08
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多