【问题标题】:aligning (float) issue cross browser对齐(浮动)问题跨浏览器
【发布时间】:2011-06-10 04:35:01
【问题描述】:

我在对齐图像(左浮动)和 div(右浮动)时遇到问题。

在 IE8、Firefox 和 Opera 上运行良好

它在 IE7 和 Google Chrome 中无法正常工作。

我不知道发生了什么。

非常感谢任何帮助。

我在HERE上传页面

【问题讨论】:

    标签: css layout cross-browser


    【解决方案1】:

    一种可能的解决方案是您将 float:left 属性添加到您的图像的相应行中,在您的代码中它看起来像这样:
    $('#imgShow').css({ <strong>'float':'left'</strong>, 'width': '450px', 'height': '300px', 'margin_bottom': '4px', 'padding-bottom': '8px' });

    我在 Google Chrome(8.0.552.208 beta,Ubuntu)中对其进行了测试,它似乎运行良好。 希望对您有所帮助。

    【讨论】:

    • 谢谢,这正是我所缺少的。
    【解决方案2】:

    尝试在 HTML 中将右浮动 div 放在首位。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-09-02
      • 1970-01-01
      • 1970-01-01
      • 2011-03-25
      • 2013-06-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多