How to align text within dijitTextbox?

169 views Asked by At

I need the typed text be aligned vertically middle with left padding (as well as placeholder text)

See picture below: enter image description here

Here is a piece of my xPage code:

<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> 
1

There are 1 answers

0
YSuraj On BEST ANSWER

By default vertical alignment is centered. You can edit margin-left/right. If you additionally want to edit the vertical position, you can use the commented code.

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">