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

前端 未结 4 2152
南旧
南旧 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:38

    I got it working removing the padding of the input button and setting a height around 20. then adjusting the height, padding of the anchor element. I Also set the line-height, font-size and the font-family.

    worked on FF,IE,safari and chrome :D

提交回复
热议问题