Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<h3>Bootstrap has added a new class from 3.0.</h3> <pre><code>&lt;div class="text-center"&gt; &lt;ul class="pagination"&gt; &lt;li&gt;&lt;a href="?p=0" data-original-title="" title=""&gt;1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="?p=1" data-original-title="" title=""&gt;2&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <h3>Bootstrap 4 has new class</h3> <pre><code>&lt;div class="text-xs-center"&gt; &lt;ul class="pagination"&gt; &lt;li&gt;&lt;a href="?p=0" data-original-title="" title=""&gt;1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="?p=1" data-original-title="" title=""&gt;2&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <h3>For 2.3.2</h3> <pre><code>&lt;div class="pagination text-center"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="?p=0" data-original-title="" title=""&gt;1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="?p=1" data-original-title="" title=""&gt;2&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <hr> <p><strike>Give this way:</strike></p> <pre><code>.pagination {text-align: center;} </code></pre> <p><strike>It works because <code>ul</code> is using <code>inline-block;</code></strike></p> <h3><strike>Fiddle: <a href="http://jsfiddle.net/praveenscience/5L8fu/">http://jsfiddle.net/praveenscience/5L8fu/</a></strike></h3> <hr> <p><strike>Or if you would like to use Bootstrap's class:</strike></p> <pre><code>&lt;div class="pagination pagination-centered"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="?p=0" data-original-title="" title=""&gt;1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="?p=1" data-original-title="" title=""&gt;2&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <h3><strike>Fiddle: <a href="http://jsfiddle.net/praveenscience/5L8fu/1/">http://jsfiddle.net/praveenscience/5L8fu/1/</a></strike></h3>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload