Could someone please tell me how can I change the default css of a alert/prompt box ?
4 Answers
You can't. They are native to the browser and are not styl-able.
You should turn to javascript alert-like systems. Using jQuery, here are some:
- jAlert
- jQuery UI dialog (with some tweaking)
- This page proposes three alternatives to native alert/confirm/prompt
This answer shows a way to have a confirm-like blocking dialog using jquery ui dialog

- 1
- 1

- 30,396
- 9
- 75
- 81
The alert
box is built into the Browser. You will need to popup your own dialog. The jQueryUI is very good for this.
For an example on this, look on the jQuery UI site.

- 47,437
- 25
- 129
- 188
As noted above you may always use the jQuery Alert box...
But you may also fire a JavaScript/jQuery Function in which displays a DIV (HTML Element), in which you may style completely.

- 3,567
- 18
- 48
- 78
The alert box that is used by javaScript is part of the browser. (other poeple have pointed this out but if you would like to have a good starting point try this.
http://jqueryui.com/demos/dialog/#default
jQuery Ui has some great tools for creating your own alert box and will also having other helpful options.
Just wanted to give some more information.

- 1,249
- 1
- 15
- 37