2016-12-28 73 views
0

我需要鍵入的文本對齊左填充(以及佔位符文本)垂直方向的中間如何對齊dijitTextbox中的文本?

下面

見圖片: enter image description here

下面是一段我XPAGE代碼:

<xe:djTextBox id="djTextBoxSearch" 
    style="width:100%;height:60px;"> 
    <xe:this.dojoAttributes> 
     <xp:dojoAttribute name="placeholder" value="Please enter a name to search..."> 
     </xp:dojoAttribute> 
    </xe:this.dojoAttributes> 
</xe:djTextBox> 

回答

2

默認垂直對齊居中。您可以編輯左/右邊距。如果您還想編輯垂直位置,則可以使用註釋的代碼。

input[type='text']{ 
 
    height : 100px; 
 
    width : 200px; 
 
    padding : 0 0 0 30px; 
 
    /* padding : 20px 0 0 0; //to change the vertical positon */ 
 
    text-align : left; 
 
}
<input type="text" placeholder="Enter text">