Both Firefox and Safari don't seem to properly render a button specified with a certain width:
<form>
<button>foo</button><br>
<button style="width=200px;height:200px">baz</button>
</form>
Button baz will render with specified height but default width. Same result in both Firefox and Safari.
Is this by design? How can I overcome this?
To do so use display: block and width: 100% . This property can be used with <button> element as well as <input> element.
To set height and width to 200px of the above example button, this would be the JS: var myButton = document. getElementById('submit-button'); myButton.
It's a syntax error:
<button style="width=200px;height:200px">baz</button>
Should be:
<button style="width:200px;height:200px">baz</button>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With