The form element input with type text strangely refuses to align with an adjacent image button ( input element of type image ). El formulario de entrada con el tipo de texto extrañamente se niega a alinear con un botón adyacente imagen (elemento de entrada de tipo imagen). 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. El problema es más bien difícil de resolver como los métodos ordinarios como usar o adaptar margen o acolchado, o incluso añadiendo blanco a la imagen falla. Here is a surprisingly simple solution to this problem. Aquí hay una sorprendentemente sencilla solución a este problema. But first lets take a look at the problem. Pero primero permite echar un vistazo al problema.

The input textbox above is misaligned with the image button above as you can see. La entrada de texto de arriba es desalinearse con la imagen como botón de arriba se puede ver. The code is: El código es el siguiente:


The solution is deceptively simple. La solución es engañosamente simple. Here is the code which works: Aquí está el código que funciona:


Here is the demo: Aquí está la demostración: