nfpyfzyf
nfpyfzyf

Reputation: 2991

How can I put alerts in navbar when using Bootstrap?

I am studying bootstrap, and build a site using this example:http://twitter.github.com/bootstrap/examples/hero.html

I want to show alerts in the navbar. How can I do that?

Upvotes: 2

Views: 5130

Answers (2)

sody
sody

Reputation: 3791

It depends on what you want. You can use labels and badges to show short message or number of notifications with a link to separate page. Or you can attach tooltip or popover to it. E.g.

<a href="#" 
   data-html="true"
   data-placement="bottom"
   data-toggle="popover"
   data-content="Notification 1<br/>Notification 2"
   data-original-title="Notifications">
    <span class="badge badge-success">2</span> Notifications
</a>

http://jsfiddle.net/WBTf8/22/

Upvotes: 2

SaurabhLP
SaurabhLP

Reputation: 3657

Use dropdown navigation for this...

Check this,

http://twitter.github.com/bootstrap/components.html#navs

http://twitter.github.com/bootstrap/components.html#navbar

Thanks

Upvotes: 0

Related Questions