voodish logo
Skip to: Content | Navigation | Site map

Create a CSS no Javascript alert message

  Posted: July, 22 2008

This quick how to will guide you through the process of creating a nice looking JavaScript alert message for any web page.

Where you would like the message to be displayed place this following no-script section:

<noscript>
<p class="alert">
Please enable JavaScript for full functionality.
</p>
</noscript>

Then in the CSS use the following code:

.alert {
background: #fff6bf url(image_folder/exclamation_mark.gif) center no-repeat;
background-position: 15px 50%;
text-align: left;
padding: 5px 20px 5px 45px;
border-top: 2px solid #ffd324;
border-bottom: 2px solid #ffd324;
}

Download files

no_jscript_alert_message_files.gif

Related Articles

Comments RSS Feed

2 Comments

  1. Synergy Informatics October 3, 2008

    Hi,

    thanks for this wonderful small piece of code. Its does what it says.

    Thanks again for this.

    Regards
    Synergy informatics

  2. Go to Top of the page

  3. Barbara August 6, 2009

    A much neater solution than I was going to use! Thanks

  4. Go to Top of the page

Leave a comment