The form element input with type text strangely refuses to align with an adjacent image button ( input element of type image ). O formulário de entrada em elemento tipo texto estranhamente se recusar a alinhar com uma imagem adjacente botão (entrada elemento do tipo imagem). The problem is rather hard to solve as regular methods like using align or margin or padding or even adding whitespace to the image fails. O problema é bastante difícil de resolver como regular alinhar ou utilizando métodos como a margem ou padding ou mesmo adicionando branco para a imagem falhar. Here is a surprisingly simple solution to this problem. Aqui está um surpreendentemente simples solução para este problema. But first lets take a look at the problem. Mas primeiro vamos dar uma olhada na problema.

The input textbox above is misaligned with the image button above as you can see. A entrada texto acima é desalinhado com a imagem botão acima, como pode ver. The code is: O código é:


The solution is deceptively simple. A solução é deceptively simples. Here is the code which works: Aqui está o código que funciona:


Here is the demo: Aqui está a demonstração: