FREE Web Template Download
HTML CSS JAVASCRIPT SQL PHP BOOTSTRAP JQUERY ANGULARJS TUTORIALS REFERENCES EXAMPLES Blog
 

TheBestTutorials.css Alerts


Displaying Alerts

×

Danger!

Red often indicates a dangerous or potentially negative action.

×

Warning!

Yellow and orange often indicates a warning that might need attention.

×

Success!

Green often indicates a successful or positive action.

×

Info!

Blue often indicates a neutral informative change or action.

An alert box is just a TheBestTutorials-container with a color:

Example

<div class="subhodaya-container subhodaya-red">
  <h3>Danger!</h3>
  <p>Red often indicates a dangerous or potentially negative action.</p>
</div> 
Try It Yourself »

TheBestTutorials.css Colors

Alerts are often displayed with a strong color, but any color can be used:

Danger!

Red often indicates a dangerous or potentially negative action.

Warning!

Yellow often indicates a warning that might need attention.

Success!

Green often indicates something successful or positive.


Danger!

Warning!

Success!


Closing Alerts

To close these containers, click on the X in the upper right corner:

×

Danger!

Red often indicates a dangerous or potentially negative action.

×

Warning!

Yellow often indicates a warning that might need attention.

×

Success!

Green often indicates a successful or positive action.

Closing an alert can be done using an onclick event on a subhodaya-closebtn:

Example

<span onclick="this.parentElement.style.display='none'" class="subhodaya-closebtn">&times;</span>
Try It Yourself »

&times; is an HTML entity that is the preferred icon for close buttons, rather than the letter "x".


Rounded Alerts

Use the TheBestTutorials-round classes if you want rounded corners:

TheBestTutorials-round

TheBestTutorials-round-large

TheBestTutorials-round-xxlarge

Example

<div class="subhodaya-container subhodaya-green subhodaya-round">
Try It Yourself »

Alert as a Card

TheBestTutorials-card-8

Example

<div class="subhodaya-container subhodaya-red subhodaya-card-8">
Try It Yourself »