Firefox/Safari setting height as [specified height - padding - border] for input[type=button]

前端 未结 4 2153
南旧
南旧 2021-02-15 03:45

When I use the following CSS:

input[type=button] {
  background-color: white;
  border: 1px solid black;
  font-size: 15px;
  height: 20px;
  padding: 7px;
}
         


        
4条回答
  •  北荒
    北荒 (楼主)
    2021-02-15 04:33

    A few things you can try:

    • Set the doctype of the document ()
    • Set the input to be display:block or display: inline-block
    • Use a reset stylesheet.

提交回复
热议问题