How can I set the button size in HTML to be percentage of screen. Pixel units work but percentage does not. See this fiddle: https://jsfiddle.net/3po5o7cb/10/
<button style="width:20%; height:20%"></button>
<button style="width:200px;height:200px"></button>
To set a percentage height, its parent element(*) must have an explicit height.
See this answer.
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