Components

Options

Align menus to the right and add include additional levels of dropdowns.

Aligning the menus

Add .pull-right to a .dropdown-menu to right align the dropdown menu.

  1. class="dropdown-menu pull-right" role="menu" aria-labelledby="dLabel">
  2. ...

Disabled menu options

Add .disabled to a

  • in the dropdown to disable the link.
    1. class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
    2. tabindex="-1" href="#">Regular link
    3. class="disabled"> tabindex="-1" href="#">Disabled link
    4. tabindex="-1" href="#">Another link

    Sub menus on dropdowns

    Add an extra level of dropdown menus, appearing on hover like those of OS X, with some simple markup additions. Add .dropdown-submenu to any li in an existing dropdown menu for automatic styling.

    1. class="dropdown-menu" role="menu" aria-labelledby="dLabel">
    2. ...
    3. class="dropdown-submenu">
    4. tabindex="-1" href="#">More options
    5. class="dropdown-menu">
    6. ...

    Examples

    Two basic options, along with two more specific variations.

    Single button group

    Wrap a series of buttons with .btn in .btn-group.

    1. class="btn-group">
    2. class="btn">Left
    3. class="btn">Middle
    4. class="btn">Right
  • Multiple button groups

    Combine sets of

    into a
    for more complex components.
    1. class="btn-toolbar">
    2. class="btn-group">
    3. ...
  • Vertical button groups

    Make a set of buttons appear vertically stacked rather than horizontally.

    1. class="btn-group btn-group-vertical">
    2. ...

    Checkbox and radio flavors

    Button groups can also function as radios, where only one button may be active, or checkboxes, where any number of buttons may be active. View the JavaScript docs for that.

    Dropdowns in button groups

    Heads up! Buttons with dropdowns must be individually wrapped in their own .btn-group within a .btn-toolbar for proper rendering.

    Overview and examples

    Use any button to trigger a dropdown menu by placing it within a .btn-group and providing the proper menu markup.

    1. class="btn-group">
    2. class="btn dropdown-toggle" data-toggle="dropdown" href="#">
    3. Action
    4. class="caret">
    5. class="dropdown-menu">

    Works with all button sizes

    Button dropdowns work at any size: .btn-large, .btn-small, or .btn-mini.

    Requires JavaScript

    Button dropdowns require the Bootstrap dropdown plugin to function.

    In some cases—like mobile—dropdown menus will extend outside the viewport. You need to resolve the alignment manually or with custom JavaScript.


    Split button dropdowns

    Building on the button group styles and markup, we can easily create a split button. Split buttons feature a standard action on the left and a dropdown toggle on the right with contextual links.

    1. class="btn-group">
    2. class="btn">Action
    3. class="btn dropdown-toggle" data-toggle="dropdown">
    4. class="caret">
    5. class="dropdown-menu">

    Sizes

    Utilize the extra button classes .btn-mini, .btn-small, or .btn-large for sizing.

    1. class="btn-group">
    2. class="btn btn-mini">Action
    3. class="btn btn-mini dropdown-toggle" data-toggle="dropdown">
    4. class="caret">
    5. class="dropdown-menu">

    Dropup menus

    Dropdown menus can also be toggled from the bottom up by adding a single class to the immediate parent of .dropdown-menu. It will flip the direction of the .caret and reposition the menu itself to move from the bottom up instead of top down.

    1. class="btn-group dropup">
    2. class="btn">Dropup
    3. class="btn dropdown-toggle" data-toggle="dropdown">
    4. class="caret">
    5. class="dropdown-menu">

    Standard pagination

    Simple pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.

    1. class="pagination">
      • href="#">Prev
      • href="#">1
      • href="#">2
      • href="#">3
      • href="#">4
      • href="#">5
      • href="#">Next

    Options

    Disabled and active states

    Links are customizable for different circumstances. Use .disabled for unclickable links and .active to indicate the current page.

    1. class="pagination">
      • class="disabled"> href="#">«
      • class="active"> href="#">1
      • ...

    You can optionally swap out active or disabled anchors for spans to remove click functionality while retaining intended styles.

    1. class="pagination">
      • class="disabled">«
      • class="active">1
      • ...

    Sizes

    Fancy larger or smaller pagination? Add .pagination-large, .pagination-small, or .pagination-mini for additional sizes.

    1. class="pagination pagination-large">
      • ...
    2. class="pagination">
      • ...
    3. class="pagination pagination-small">
      • ...
    4. class="pagination pagination-mini">
      • ...

    Alignment

    Add one of two optional classes to change the alignment of pagination links: .pagination-centered and .pagination-right.

    1. class="pagination pagination-centered">
    2. ...
    1. class="pagination pagination-right">
    2. ...

    Pager

    Quick previous and next links for simple pagination implementations with light markup and styles. It's great for simple sites like blogs or magazines.

    Default example

    By default, the pager centers links.

    1. class="pager">
    2. href="#">Previous
    3. href="#">Next

    Aligned links

    Alternatively, you can align each link to the sides:

    1. class="pager">
    2. class="previous">
    3. href="#">← Older
    4. class="next">
    5. href="#">Newer →

    Optional disabled state

    Pager links also use the general .disabled utility class from the pagination.

    1. class="pager">
    2. class="previous disabled">
    3. href="#">← Older
    4. ...

    Labels

    Labels Markup
    Default Default
    Success Success
    Warning Warning
    Important Important
    Info Info
    Inverse Inverse

    Badges

    Name Example Markup
    Default 1 1
    Success 2 2
    Warning 4 4
    Important 6 6
    Info 8 8
    Inverse 10 10

    Easily collapsible

    For easy implementation, labels and badges will simply collapse (via CSS's :empty selector) when no content exists within.

    Hero unit

    A lightweight, flexible component to showcase key content on your site. It works well on marketing and content-heavy sites.

    Hello, world!

    This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.

    Learn more

    1. class="hero-unit">
    2. Heading

    3. Tagline

    4. class="btn btn-primary btn-large">
    5. Learn more

    Page header

    A simple shell for an h1 to appropriately space out and segment sections of content on a page. It can utilize the h1's default small, element as well most other components (with additional styles).

    1. class="page-header">
    2. Example page header Subtext for header

    Default thumbnails

    By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.

    Highly customizable

    With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.

    • 300x200

      Thumbnail label

      Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

      Action Action

    • 300x200

      Thumbnail label

      Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

      Action Action

    • 300x200

      Thumbnail label

      Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

      Action Action

    Why use thumbnails

    Thumbnails (previously .media-grid up until v1.4) are great for grids of photos or videos, image search results, retail products, portfolios, and much more. They can be links or static content.

    Simple, flexible markup

    Thumbnail markup is simple—a ul with any number of li elements is all that is required. It's also super flexible, allowing for any type of content with just a bit more markup to wrap your contents.

    Uses grid column sizes

    Lastly, the thumbnails component uses existing grid system classes—like .span2 or .span3—for control of thumbnail dimensions.

    Markup

    As mentioned previously, the required markup for thumbnails is light and straightforward. Here's a look at the default setup for linked images:

    1. class="thumbnails">
    2. class="span4">
    3. href="#" class="thumbnail">
    4. data-src="holder.js/300x200" alt="">
    5. ...

    For custom HTML content in thumbnails, the markup changes slightly. To allow block level content anywhere, we swap the for a

  • ...
  • More examples

    Explore all your options with the various grid classes available to you. You can also mix and match different sizes.

    Default alert

    Wrap any text and an optional dismiss button in .alert for a basic warning alert message.

    Warning! Best check yo self, you're not looking too good.
    1. class="alert">
    2. type="button" class="close" data-dismiss="alert">×
    3. Warning! Best check yo self, you're not looking too good.

    Dismiss buttons

    Mobile Safari and Mobile Opera browsers, in addition to the data-dismiss="alert" attribute, require an href="#" for the dismissal of alerts when using an tag.

    1. href="#" class="close" data-dismiss="alert">×

    Alternatively, you may use a

    Dismiss alerts via JavaScript

    Use the alerts jQuery plugin for quick and easy dismissal of alerts.


    Options

    For longer messages, increase the padding on the top and bottom of the alert wrapper by adding .alert-block.

    Warning!

    Best check yo self, you're not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

    1. class="alert alert-block">
    2. type="button" class="close" data-dismiss="alert">×
    3. Warning!

    4. Best check yo self, you're not...

    Contextual alternatives

    Add optional classes to change an alert's connotation.

    Error or danger

    Oh snap! Change a few things up and try submitting again.
    1. class="alert alert-error">
    2. ...

    Success

    Well done! You successfully read this important alert message.
    1. class="alert alert-success">
    2. ...

    Information

    Heads up! This alert needs your attention, but it's not super important.
    1. class="alert alert-info">
    2. ...

    Examples and markup

    Basic

    Default progress bar with a vertical gradient.

    1. class="progress">
    2. class="bar" style="width: 60%;">

    Striped

    Uses a gradient to create a striped effect. Not available in IE7-8.

    1. class="progress progress-striped">
    2. class="bar" style="width: 20%;">

    Animated

    Add .active to .progress-striped to animate the stripes right to left. Not available in all versions of IE.

    1. class="progress progress-striped active">
    2. class="bar" style="width: 40%;">

    Stacked

    Place multiple bars into the same .progress to stack them.

    1. class="progress">
    2. class="bar bar-success" style="width: 35%;">
    3. class="bar bar-warning" style="width: 20%;">
    4. class="bar bar-danger" style="width: 10%;">

    Options

    Additional colors

    Progress bars use some of the same button and alert classes for consistent styles.

    1. class="progress progress-info">
    2. class="bar" style="width: 20%">
    3. class="progress progress-success">
    4. class="bar" style="width: 40%">
    5. class="progress progress-warning">
    6. class="bar" style="width: 60%">
    7. class="progress progress-danger">
    8. class="bar" style="width: 80%">

    Striped bars

    Similar to the solid colors, we have varied striped progress bars.

    1. class="progress progress-info progress-striped">
    2. class="bar" style="width: 20%">
    3. class="progress progress-success progress-striped">
    4. class="bar" style="width: 40%">
    5. class="progress progress-warning progress-striped">
    6. class="bar" style="width: 60%">
    7. class="progress progress-danger progress-striped">
    8. class="bar" style="width: 80%">

    Browser support

    Progress bars use CSS3 gradients, transitions, and animations to achieve all their effects. These features are not supported in IE7-9 or older versions of Firefox.

    Versions earlier than Internet Explorer 10 and Opera 12 do not support animations.

    Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.

    Default example

    The default media allow to float a media object (images, video, audio) to the left or right of a content block.

    64x64

    Media heading

    Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
    64x64

    Media heading

    Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
    64x64

    Media heading

    Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
    1. class="media">
    2. class="pull-left" href="#">
    3. class="media-object" data-src="holder.js/64x64">
    4. class="media-body">
    5. class="media-heading">Media heading
    6. ...
    7. class="media">
    8. ...

    Media list

    With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists).

    • 64x64

      Media heading

      Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.

      64x64

      Nested media heading

      Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
      64x64

      Nested media heading

      Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
      64x64

      Nested media heading

      Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
    • 64x64

      Media heading

      Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
    1. class="media-list">
    2. class="media">
    3. class="pull-left" href="#">
    4. class="media-object" data-src="holder.js/64x64">
    5. class="media-body">
    6. class="media-heading">Media heading
    7. ...
    8. class="media">
    9. ...

    Wells

    Use the well as a simple effect on an element to give it an inset effect.

    Look, I'm in a well!
    1. class="well">
    2. ...

    Optional classes

    Control padding and rounded corners with two optional modifier classes.

    Look, I'm in a well!
    1. class="well well-large">
    2. ...
    Look, I'm in a well!
    1. class="well well-small">
    2. ...

    Close icon

    Use the generic close icon for dismissing content like modals and alerts.

    1. class="close">×

    iOS devices require an href="#" for click events if you would rather use an anchor.

    1. class="close" href="#">×

    Helper classes

    Simple, focused classes for small display or behavior tweaks.

    .pull-left

    Float an element left

    1. class="pull-left"
    1. .pull-left {
    2. float: left;
    3. }

    .pull-right

    Float an element right

    1. class="pull-right"
    1. .pull-right {
    2. float: right;
    3. }

    .muted

    Change an element's color to #999

    1. class="muted"
    1. .muted {
    2. color: #999;
    3. }

    .clearfix

    Clear the float on any element

    1. class="clearfix"
    1. .clearfix {
    2. *zoom: 1;
    3. &:before,
    4. &:after {
    5. display: table;
    6. content: "";
    7. }
    8. &:after {
    9. clear: both;
    10. }
    11. }
       Copyright 2017 by DotNetNuke Corporation  |  Terms Of Use  |  Privacy Statement  |  Login