【问题标题】:css alignment breaks in ie7 but works elsewherecss对齐在ie7中中断但在其他地方工作
【发布时间】:2012-08-30 16:50:17
【问题描述】:

请看这个页面:https://tjandpals.com/howto-html

在现代 firefox、safari、chrome 和 internet explorer 中看起来很正常。

然而,在 ie7 中,它破坏了对齐方式...

有什么线索可以让它更兼容吗?

【问题讨论】:

    标签: html css internet-explorer cross-browser


    【解决方案1】:

    你可以在给定的类上使用 ie7 hack:

    .leftAd {*top:60px}
    .TopAd{*float:none;*width:600px}
    

    这个东西在ie7中可以正常工作

    【讨论】:

      【解决方案2】:

      作为第一步(抱歉,目前我只有一点时间),您可以将#HowToLanding DIV 的高度设置为自动。这会将图块置于正确的位置。

      你可以这样做:

      #HowToLanding { height: 550px; *height: auto; }
      

      更新: ...并对#Footer 执行相同操作

      #Footer { height: 150px; *height: 150px; ... }
      

      HTH,
      --hennson

      【讨论】:

        【解决方案3】:

        加你<div id="TopAd">...</div and <div id="TopAd">...</div>indide

        <div id="HowToLanding">..</div>
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2012-02-04
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多