The form element input with type text strangely refuses to align with an adjacent image button ( input element of type image ). L'élément de formulaire de saisie de type texte étrangement refuse de s'aligner sur un bouton adjacent image (élément input de type image). 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. Le problème est plutôt difficile à résoudre comme des méthodes comme l'utilisation ou la marge d'aligner ou de remplissage ou même d'ajouter des espaces à l'image échoue. Here is a surprisingly simple solution to this problem. Voici une solution étonnamment simple à ce problème. But first lets take a look at the problem. Mais d'abord, permet de jeter un coup d'oeil au problème.

The input textbox above is misaligned with the image button above as you can see. L'entrée de texte ci-dessus était mal aligné avec l'image ci-dessus bouton comme vous pouvez le voir. The code is: Le code est:


The solution is deceptively simple. La solution est simple. Here is the code which works: Voici le code qui fonctionne:


Here is the demo: Voici la démo: