我需要一套(幾個「行」)標籤/文本輸入元素。我希望文本輸入元素垂直對齊而不使用HTML表格。這似乎所有的標籤設置爲一個足夠大的寬度應該這樣做,但是,這並不工作:如何在不使用HTML表格的情況下使文本輸入對齊?
HTML
<label>Invoice #</label>
<input type="text" id="invoiceNumber"></input>
</br>
<label>Date</label>
<input type="text" id="date"></input>
CSS
label {
font-family: Consolas, 'Segoe UI', sans-serif;
margin-left: 10px;
min-width: 120px;
}
的jsfiddle在http://jsfiddle.net/clayshannon/8wRT3/1/
你的意思是,像[this](http://jsfiddle.net/EycNZ/)? – insertusernamehere
由於@insertusername在此演示,真正的問題是