<p>I want to float a div to the right at the top of my page. It contains a 50px square image, but currently it impacts on the layout of the top 50px on the page.</p>

<p>Currently its:</p>

<pre><code>&lt;div style="float: right;"&gt;
  ...
&lt;/div&gt;
</code></pre>

<p>I tried z-index as I thought that would be the answer, but I couldn't get it going.</p>

<p>I know it's something simple I'm missing, but I just can't seem to nail it.</p>

Try setting its
```
position
```
to absolute. That takes it out of the flow of the document.