【问题标题】:why are the four buttons not lining up in IE?为什么IE中的四个按钮不对齐?
【发布时间】:2011-08-23 22:43:17
【问题描述】:

所以我有这个page,如果您查看 4 个按钮“试驾”“租赁拥有选项”分机...它们没有与 IE 中的 div 底部对齐。在 Firefox 中它看起来不错..这里是 html

<div class="main-img-box">
                <img alt="Retail POS Systems" src="/images/software/video_pos_software.png">
                <div class="main-cont-software">
                <a href="/downloads/video_vision_download.php" class="video-testdrive rest_icons"><span></span></a>
 <a href="/lease" class="video-lease rest_icons"><span></span></a>
<a href="javascript:addBookmark('POSNation.com%20-%20Video%20Rental%20POS%20Systems',window.location);" class="video-bookmark rest_icons"><span></span></a>
<a href="/shop_pos/index.php?route=information/contact" class="video-ask rest_icons"><span></span></a>                  </div>
            </div>

这里是一些相关的 CSS

            .main-img-box {
                height: 398px;
                position: relative;
                width: 100%;
            }

            .main-cont-software {
                bottom: 0;
                color: #FFFFFF;
                height: 76px;
                left: 14px;
                position: absolute;
                width: 100%;
            }

            .video-testdrive {
                background: url("../images/software/pos-sw-btn-video-testdrive.png") repeat scroll 0 0 transparent;
                display: inline-block;
                height: 57px;
                margin-right: 9px;
                width: 169px;
            }

            .video-lease {
                background: url("../images/software/pos-sw-btn-video-lease.png") repeat scroll 0 0 transparent;
                display: inline-block;
                height: 57px;
                margin-right: 9px;
                width: 169px;
            }

关于我缺少什么的任何想法

还有一个测试 IE 的好工具..我在 firefox 上使用 firebug,效果很好,但我总是在 IE 上遇到困难..那里也有任何建议

【问题讨论】:

  • 你说的是哪个IE?
  • IE8 - 由@thirtydot 解答
  • 可以使用IE开发者工具。在 IE 8 及更高版本中,这些工具已经是 IE 的一部分(按 F12 键)。我认为 IE 7 和 IE 6 你必须下载并安装它们。

标签: html css internet-explorer


【解决方案1】:

您需要添加vertical-align: top ..again

.main-cont-software a {
    vertical-align: top;
}

更多信息:


还有一个很好的工具来测试 IE..我在 firefox 上使用 firebug 和它 效果很好,但我总是很难用 IE ..任何建议 那里也有

到目前为止,最好的选择是内置的(IE8+)开发工具(按 F12)。

如果你想在 IE6/7 中测试时使用它们,你必须download it。虽然对于IE7,你可以只使用IE8/9中的兼容模式来测试。

【讨论】:

  • 你是怎么找到这些的?您是否有像您一样轻松找到它的工具?
  • 这不会在 IE6/7 中修复它,这就是为什么我问他正在测试哪个 IE。从文章中可以看出,IE6/7 需要触发布局和display: inline,因为它们不明确支持 inline-block。
  • @kmiyashiro:他将它应用于a 元素(自然是内联的),所以这不是问题。此外,它已经在 IE7 中排成一行(尽管 IE7 中该页面还有很多其他问题)。
  • 内置开发者工具?你说的是哪个IE? Developer Toolbar 是一个必须安装在 IE6/7 中的插件。 microsoft.com/download/en/details.aspx?id=18359
  • 是的,主要是 IE7 中此页面上的标题存在问题......任何想法导致标题看起来像这样的任何想法
猜你喜欢
  • 1970-01-01
  • 2018-12-21
  • 2021-12-01
  • 2011-03-27
  • 2016-03-31
  • 2014-11-05
  • 2015-05-19
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多