The form element input with type text strangely refuses to align with an adjacent image button ( input element of 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.問題是相當難以解決,作為經常使用的方法一樣,贊同或保證金或填充,甚至加入到空白的形象失敗。 Here is a surprisingly simple solution to this problem.這裡是一個出乎意料的簡單,要解決這個問題。 But first lets take a look at the problem.但首先讓考慮一下這個問題。

The input textbox above is misaligned with the image button above as you can see.輸入文本框以上是失調與形象上面的按鈕,因為你可以看到。 The code is:該代碼是:


The solution is deceptively simple.解決的辦法是簡單。 Here is the code which works:這裡是代碼,其中工程:


Here is the demo:這裡是演示: