"Center Text - Image"
Bootstrap 3.0.0 Snippet by silentcoding

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!-- 1 class="text-center" --> <div class="container"> <div class="row"> <h2 class="text-center">CENTER TEXT 1</h2> </div> </div> <!-- 2 align="center" --> <div class="container"> <div class="row"> <h2 align="center">CENTER TEXT 2</h2> </div> </div> <!-- 3 row="text-center" --> <div class="container"> <div class="row text-center"> <h2>CENTER TEXT 3</h2> </div> </div> <br/> <!-- 4 margin:0 auto --> <div class="container"> <div class="row"> <h2 style="margin:0 auto;display:table;">CENTER TEXT 4</h2> </div> </div> <br/> <!-- 5 <center></center> --> <center> <div class="container"> <div class="row"> <h2>CENTER TEXT 5</h2> </div> </div> </center> <!-- 6 style.css --> <div class="centered"> <div class="container"> <div class="row"> <h2>CENTER TEXT 6</h2> </div> </div> </div> <!-- 7 style.css --> <div class="centered2"> <div class="container"> <div class="row"> <h2>CENTER TEXT 7</h2> </div> </div> </div> <br/> <!-- 8 style.css --> <div class="centered3"> <div class="container"> <div class="row"> <h1>H Tag</h1> <h2>H Tag</h2> <h3>H Tag</h3> <h4>H Tag</h4> <h5>H Tag</h5> <h6>H Tag</h6> <p>P Tag</p> </div> </div> </div> <br/> <center> <a href="https://placeholder.com"> <img src="http://via.placeholder.com/350x150"> </a> </center> <br/> <a href="https://placeholder.com"> <img src="http://via.placeholder.com/350x150" style="margin:0 auto;display:table;"> </a>
.centered{ text-align:center; } .centered2{ margin:0 auto; display:table; } .centered3{ text-align:center; color:blue; }

Related: See More


Questions / Comments: