Anchoring an element to the browser's vertical scrollbar
What is wrong with:

&lt;body&gt;
    ...
    &lt;div id="myfloatingElement"&gt;This is the element&lt;/div&gt;
&lt;/body&gt;


css:

#myfloatingElement
{
    position: fixed;
    right: 0;
    top: 50%;
}