【问题标题】:css display: online; not working in IE7css显示:在线;不能在 IE7 中工作
【发布时间】:2011-07-28 14:39:30
【问题描述】:

如果您查看此链接http://northshorewebdesign.net/walkboston/index.html,在左下角附近有一组 4 个导航图标。你会注意到,它们不是水平放置,而是对角线——这不是我想要的。在 FF、Chrom、IE9 中,图标按应有的方式水平排列。谁能告诉我为什么在 IE7 中斜行? 我设置了 display: inline;和浮动:左;

【问题讨论】:

    标签: css internet-explorer-7 inline


    【解决方案1】:

    您应该设置它们 display:block 并为它们中的每一个设置一个 width,然后 float:left 将按照您的意愿工作.

    【讨论】:

    • +1 但不要忘记添加一个元素 clear: both;在图标之后,否则页脚会在顶部。
    • 我实际上不得不像浮动每个 li 一样:ul#icon-links li { float:left; }
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-05-13
    • 1970-01-01
    • 1970-01-01
    • 2013-07-07
    • 1970-01-01
    • 1970-01-01
    • 2012-03-13
    相关资源
    最近更新 更多