make text input center align

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
lamany77
User
Posts: 144

make text input center align

Post by lamany77 »

Dear all

i've code below :

$('#x_tmp_nmu_appr_01').appendTo('[class="box ewBox ewGrid ewGridAddEdit t_dpr"]');

how do i centering "tmp_nmu_appr_01" to class "box ewBox ewGrid ewGridAddEdit t_dpr"

i try but the alignment is always left.


sangnandar
User
Posts: 980

Post by sangnandar »

I would assumed $('#x_tmp_nmu_appr_01') is an <input> element.
I would assumed '[class="box ewBox ewGrid ewGridAddEdit t_dpr"]' has center alignment.

To get <input> text to be center you need,
<input style="text-align: center;"> or <input class="center"> being the style defined in .center

Note that <input> text will not inherit styling from it's parent. So this structure, for example:
<div class="center">
<input>
</div>
will not center <input> text.

Try,
Edit Tag -> Custom Attributes -> ' style="text-align: center;" '


Post Reply