Well for starters you can't really edit the alert
box's width. See here for a similar question about this:
how to change the style of alert box
Sure you can do some hackish things like \n
but that still doesn't give you the customization you COULD have. I would highly suggest making your own alertbox using a div
that you style on your own and write the javascript manually so it pops up like an alert. Take a look @Gaby aka G. Petrioli answer below. He has a very good example. You can also try using some APIs that do it for you.
jQuery dialog is one of many but to give you a sense of how it works (since it seems you are new) jQuery does most of the work for you -- all you really have to do is src
their javascript file into your code and then call on it accordingly. You can check out some of the functions they provide for you here. Specifically I linked you to the minWidth section because I believe that is something you are looking for.
If you have questions on how to use jQuery or get confused, feel free to comment here. We like to see people trying to code on Stackoverflow so don't be shy to ask questions (just make sure you are asking good ones and researching before you post). We were all novices once -- the way we become experts is through application and experimentation.