Note that there are some explanatory texts on larger screens.

plurals
  1. POCentering text in a table in Twitter Bootstrap
    text
    copied!<p>I have this code:</p> <pre><code>&lt;table class="table"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;1&lt;/th&gt; &lt;th&gt;1&lt;/th&gt; &lt;th&gt;1&lt;/th&gt; &lt;th&gt;1&lt;/th&gt; &lt;th&gt;2&lt;/th&gt; &lt;th&gt;2&lt;/th&gt; &lt;th&gt;2&lt;/th&gt; &lt;th&gt;2&lt;/th&gt; &lt;th&gt;3&lt;/th&gt; &lt;th&gt;3&lt;/th&gt; &lt;th&gt;3&lt;/th&gt; &lt;th&gt;3&lt;/th&gt; &lt;th&gt;4&lt;/th&gt; &lt;th&gt;4&lt;/th&gt; &lt;th&gt;4&lt;/th&gt; &lt;th&gt;4&lt;/th&gt; &lt;th&gt;5&lt;/th&gt; &lt;th&gt;5&lt;/th&gt; &lt;th&gt;5&lt;/th&gt; &lt;th&gt;5&lt;/th&gt; &lt;th&gt;6&lt;/th&gt; &lt;th&gt;6&lt;/th&gt; &lt;th&gt;6&lt;/th&gt; &lt;th&gt;6&lt;/th&gt; &lt;th&gt;7&lt;/th&gt; &lt;th&gt;7&lt;/th&gt; &lt;th&gt;7&lt;/th&gt; &lt;th&gt;7&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td colspan="4"&gt;Lorem&lt;/td&gt; &lt;td colspan="4"&gt;ipsum&lt;/td&gt; &lt;td colspan="4"&gt;dolor&lt;/td&gt; &lt;td colspan="4"&gt;sit&lt;/td&gt; &lt;td colspan="4"&gt;amet&lt;/td&gt; &lt;td colspan="4"&gt;Lorem&lt;/td&gt; &lt;td colspan="4"&gt;ipsum&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;​ @import url('http://twitter.github.com/bootstrap/assets/css/bootstrap.css'); table, thead, tr, tbody, th, td { text-align: center; } </code></pre> <p><a href="http://jsfiddle.net/JeCpZ/" rel="noreferrer">Fiddle</a></p> <p>For some reason, The text inside the table still is not centered. Why? How do I center the text inside the table?</p> <p>To make it really Clear: For example, I want "Lorem" to sit in the middle of the four "1". ​</p>
 

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