title: Align div with fixed position on the right side
body: <p>I want to show a <code>div</code> which is always visible even as the user scrolls the page. I have used the CSS <code>position: fixed;</code> for that.</p>
  <p>Now I also want to show the <code>div</code> at the right hand corner of the parent <code>div</code>.</p>
  <p>I tried to use this CSS code to achieve the goal:</p>
  <pre class="lang-css prettyprint-override"><code>.test {
    position: fixed;
    text-align: right;
  }
  </code></pre>
  <p>But it doesn't align the element on the right side.</p>
  <p>My example page can be found <a href="https://nvoids.com/width.jsp" rel="nofollow noreferrer">here</a>, the <code>div</code> element I want to align is called <code>test</code> under the parent class <code>parent</code>.</p>
  <p>Is there any CSS or JavaScript solution to aligning the fixed position element on the right side of the screen?</p>