html - 按钮合并到 IE 7 中的列表元素

标签 html css html-lists

我对一组仅在 IE 7 或更低版本中合并到列表元素的按钮有疑问。因此,所有按钮都与 Title 2 一起出现在第二个 li 元素中。请参阅下面的 html 和 css

<ul class="tabs">
   <li><a href="#tab1">Title 1</a></li>
   <li><a href="#tab2">Title 2</a></li>
   <span class="button-span">
   <button id="print" title="Print">
   <img alt="Print" src="images/ico-print.png" border="0"/>
   </button>
   <button id="save" title="Save">
   <img alt="Save" src="images/word.gif"/>
   </button>
   </span>
</ul>

CSS

ul.tabs li {
    background: url('../images/gradient-black.png') repeat-x top left #262626;
    border-top: 1px solid #444;
    border-left: 1px solid #535250;
    border-right: 1px solid #535250;
    -webkit-border-top-left-radius: 6px;
    -moz-border-top-left-radius: 6px;
    border-top-left-radius: 6px;
    -webkit-border-top-right-radius: 6px;
    -moz-border-top-right-radius: 6px;
    border-top-right-radius: 6px;
    cursor: pointer;
    float: left;
    margin: 0 5px 0 0;
    padding: 6px 20px;
    overflow: hidden;
    text-align: center;
    width: 200px;
}

span.button-span {
    margin-right: 35px;
    float: right;
    clear: both;
}

最佳答案

你应该看看这个:http://stackoverflow.com/questions/1903453/what-disadvantages-are-there-to-the-button-tag-it-seems-there-are-quite-a -fe 的线索,为什么它不能正常工作,你还需要像 @da5id 说的那样关闭你的 span 标签

关于html - 按钮合并到 IE 7 中的列表元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13847150/

相关文章:

html - 导航栏不会完全覆盖屏幕

html - 创建一个填充可用空间的文本区域

html - 覆盖 Bootstrap 导航背景颜色

html - 文本和图像缩放不同

HTML/CSS 流程图不适合屏幕 View

html - CSS <li> 不扩展

html - 使侧边栏(在 React 中)即使在滚动时也占据页面高度的 100%

javascript - 下载 HTML 格式的文本文件

javascript - Chrome 中的 RotateY 无法正常工作?

css - HTML 无序列表的元素符号被遮盖了一半