2016-12-28 71 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">