How to center div within col-md-12 in bootstrap
<p>I have problem with centering components within <code>col-md-12</code>. For example I have 12 columns with <code>&lt;h1&gt;</code> or <code>&lt;h2&gt;</code> inside. I want to <code>&lt;h1&gt;</code> to be centered.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/&gt;

&lt;div class="container"&gt;
  &lt;div class="row"&gt;
    &lt;div class="col-md-12"&gt;
      &lt;div id="naglowek"&gt;
        &lt;h1&gt;Something&lt;/h1&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>

<p>I tried to access css class <code>text-center</code> or <code>block-center</code> to divs, but everytime <code>&lt;h1&gt;</code> was floated to the left. I need have this centered and set padding on my own. How can I solve this?</p>