Link to home
Start Free TrialLog in
Avatar of Sthokala
SthokalaFlag for United States of America

asked on

how to set text alignment for the button

Hi,
  I created a button using java script, I want to align the text on the button. I am creating button like below. Please let me know how can I align button text.

Thank you
var buttonnode= document.createElement('input');
buttonnode.setAttribute('type','button');
buttonnode.setAttribute('name',i+1);
buttonnode.setAttribute('value',values[1]);
buttonnode.setAttribute('id',values[0]);
buttonnode.style.cssText="font-size :'10';height: 30px;vertical-align: middle;width=95%";

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of LZ1
LZ1
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sthokala

ASKER

Hi, Thank you so much for your reply. Please find the attached image. I want the text to be aligned top and left.

Thank you
Capture.PNG
Thank you..there was some spaces..I removed them
Glad you got it!