Question:

Can I apply CSS to JavaScript Prompts?

by Guest31916  |  earlier

0 LIKES UnLike

I'm using standard Java Script prompts on a website I'm developing, which I haven't done since the nineties! So I need to update my knowledge a little.

Since web design has changed somewhat in the intervening years I'm trying to figure out whether I can use CSS to make these dialogs a bit nicer to look at. If this is not possible I'd thank you for telling me, or if you can provide a link to a tutorial or similar article I would be grateful.

 Tags:

   Report

3 ANSWERS


  1. Thank you for your spam Layla.  I've seen that you post this link as often as possible.

    The standard javascript input box: no.

    But you can create pop up boxes that accept input with standard html forms using CSS.  That would be a better route to go than using the javascript input boxes even if the default is okay simply because it's part of the page, not the browser.


  2. No, css does not apply to JS dialogs. If you want it to look nice you will have to fake it with separate window and html form

  3. No, you can't style the default JavaScript prompts. You can however create your own prompts that you can style. For this you best use a library like Yahoo!'s YUI. An example (and the link to yui) can be found in the souces below

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.