Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Alert classes

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 298
    Comment on it

    how to make alert messages in bootstrap.

    Bootstrap prvoides an predefined class .alert for creating alert messages which can be customized according to the requirement. Alerts are created with the .alert class, followed by one of the four contextual classes .alert-success, .alert-info, .alert-warning or .alert-danger:

    eg:

    <!DOCTYPE html>
    <html lang="en">
    <head>
      <title>Bootstrap Example</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
      <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    </head>
    <body>
    
    <div class="container">
      <h2>Alerts</h2>
      <div class="alert alert-success">
        <strong>Success!</strong> This alert box could indicate a successful or positive action.
      </div>
      <div class="alert alert-info">
        <strong>Info!</strong> This alert box could indicate a neutral informative change or action.
      </div>
      <div class="alert alert-warning">
        <strong>Warning!</strong> This alert box could indicate a warning that might need attention.
      </div>
      <div class="alert alert-danger">
        <strong>Danger!</strong> This alert box could indicate a dangerous or potentially negative action.
      </div>
    </div>
    
    </body>
    </html>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: