I'm using javascript to create buttons in a chrome extension but I can't find a way to change the size of the button, here's the code.
var buttonShort = document.createElement("button");
buttonShort.innerHTML = "Generate Short Password";
var body = document.getElementsByTagName("body")[0];
body.appendChild(buttonShort);
buttonShort.addEventListener ("click", function() {
var newWindow = window.open();
newWindow.document.write("The generated Password is: '" + short() + "'");
newWindow.focus()
});
I need to change the size of the button (mainly the width) so if you have any suggestions, please say. Also if you're going to say use CSS, I don't know how to add a CSS file to a javascript file so please tell me how to do that if you don't mind.
Thanks.