I want to create button containing text and picture using DOM. In my code, I can get text and picture on the button. But the problem, on the button the picture apear in the top and the text after the picture not in the same line.
phone_btn.appendChild(picture)
phone_btn.appendChild( document.createTextNode(text) );
I use also CSS like this code but the picture didn't appear
phone_btn.backgroundImage= 'url(http:...)';
phone_btn.backgroundRepeat='no-repeat';
phone_btn.paddingLef='30px';
phone_btn.appendChild( document.createTextNode(text) );
What can I do to make the picture and text line up?