<pre><code>div#thing {
  position: absolute;
  top: 0px;
  z-index: 2;
  margin: 0 auto;
}

&lt;div id="thing"&gt;
   &lt;p&gt;text text text with no fixed size, variable font&lt;/p&gt;
&lt;/div&gt;
</code></pre>

<p>The div is at the top, but I can't center it with <code>&lt;center&gt;</code> or <code>margin: 0 auto</code>;</p>

Your problem may be solved if you give your
```
div
```
a fixed width, as follows:
```
```
div#thing {
    position: absolute;
    top: 0px;
    z-index: 2;
    width:400px;
    margin-left:-200px;
    left:50%;
}
```
```