代码之家  ›  专栏  ›  技术社区  ›  Marwelln

为什么Firefox在输入端有3px宽的边框[type=submit]?

  •  0
  • Marwelln  · 技术社区  · 15 年前

    alt text

    alt text

    alt text

    我的CSS如下所示:

    input, select, textarea {
     margin-bottom:3px;
    }
    input, select, button, textarea {
     font-family: Tahoma, Verdana, sans-serif, FreeSans;
     font-size:11px;
    }
    input[type=submit] {
     padding:1px 3px;
    }
    

    有人知道我该怎么解决吗?

    1 回复  |  直到 15 年前
        1
  •  0
  •   Pointy    15 年前

    你可以通过添加以下内容来消除IE中荒谬的左右两边填充:

    width: auto; overflow: visible;
    

    对于CSS的按钮,以及“提交”和“按钮”输入。(为什么?谁知道呢?)

    推荐文章