Can I control the font size of the string in a javascript alert()
call??!
I've the image below and I want to increase the font size so that it is legible.
Javascript Alert Pop Up
To set the width and height of an alert box in JavaScript, you need to use the custom alert box. This alert box is styled with CSS.
The standard alert box in JavaScript does not provide the option to apply CSS. To style your alert box, you need to create a custom one first. The custom alert box will be created using jQuery and styles will be applied to CSS.
The finally negative to these native JavaScript alert dialogs is they cannot be styled or customized.
Can I control the font size of the string in a javascript alert() call??!
Nope. How the alert window is rendered is entirely up to the browser.
You would have to use a JavaScript based dialog windows alternative like jQuery UI Dialog.
No, this is controlled by the browser. I don't use alerts anymore I use jQuery UI dialog, it's fully customizable
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