Bootstrap Helper Classes In this tutorial you will learn about the Bootstrap In this tutorial, you will learn about the boot helper class.Boot helper classGuide provides CSS class common use one.

Context color
You can use the context color class, such as the .text- successful .text-info and the .text warning, in order to emphasize text. See the guide layout tutorial for more details.
Similar contextual text color class, you can use the context class background color background color elements to their request additional attention.


Important: Please read the instructions carefully before proceeding.

Success: Your message has been sent successfully.

Note: You must agree with the terms and conditions to complete the sign up process.

Warning: There was a problem with your network connection.

Error: An error has been occurred while submitting your data.


— The output of the above example will look something like this:

Bootstrap Background Emphasis Classes

Note:The contextual background classes only apply the CSS background-colorproperty on the element. To adjust the space between content and border-box you have to set the CSS padding property yourself.

Close Icon

Bootstrap provides a generic close icon that can be used for dismissing modals and alerts.



<div class="alert alert-warning">
    <a href="#" class="close" data-dismiss="alert">&times;</a>
    <strong>Warning!</strong> There was a problem with your network connection.

Bootstrap Close Icon Demo

Caret Icon

Bootstrap provides a generic caret icon to indicate the dropdown functionality. The direction of the caret icon will reverse automatically in dropup menus.


<ul class="nav nav-pills">

<li class="active"><a href="#">Home</a></li>

<li><a href="#">About</a></li>

<li class="dropdown">
        <a href="#" data-toggle="dropdown" class="dropdown-toggle">Services <span class="caret"></span></a>

<ul class="dropdown-menu">

<li><a href="#">Design</a></li>

<li><a href="#">Development</a></li>




— The output of the above example will look something like this:
Bootstrap Caret Icon Demo

Center Alignment of Content Blocks

You can use the Bootstrap class .center-block to align the content block horizontally center. However, to see the effect of this class you have to set the width of the content block yourself and it should be less than the containing parent element.


<div class="wrapper">

<div class="center-block">Center Aligned DIV Box</div>


See the tutorial on CSS alignment to learn more about aligning the elements.
Quick Floats
You can quickly float an element to the left or right using the .pull-left and .pull-right classes. These classes included the CSS !important declaration to avoid specificity issues.


<div class="pull-left">Floated to left.</div>

<div class="pull-right">Floated to right.</div>


The .clearfix class clears the float on any element. This class is widely used for fixing thecollapsing parent issue, where parent element contains floated boxes.




<div class="wrapper clearfix">

<div class="pull-left">Float to left</div>

<div class="pull-right">Float to right</div>


See CSS Positioning tutorial to learn more about the clear floating elements.
Show and hide content
You can force the use of the elements to show or hide .show and .hidden class all devices. The class also includes CSS! important statement, to avoid the special nature of the conflict, as fast float.
In addition, you can use only a well-known class .invisible switching element; but the element still occupies layout space.



This is visible to the user.


Content Specific to Screen Readers
The special .sr-only class hides an element to all devices except screen readers.



This paragraph is visible to all devices.

This paragraph is only visible to screen readers.


Hide Text Only
You can use the class .text-hide to hide the text content of an element.



The text of this heading is not visible

The text of this paragraph is not visible.