exclude a div from the body

body {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0e1538;
}
<canvas id="spaceholder" width="804" height="604"></canvas>

</div>

<div class="MenüCenter">

  <canvas id="canvas" width="800" height="600"></canvas>

  <section id="GameOver">
    <h1 class="title">GAME OVER!</h1>
    <h3 id="RestartBTN">Restart?</h3>
  </section>

  <section id="StartMenu">
    <h1 class="titlestart">Welcome to space adventure</h1>
    <h3 id="PlayBTN">Play</h3>
  </section>

  <section id="Pause">
    <h1 class="titelPause">Pause</h1>
    <h3 id="ResumeBTN">Resume</h3>
  </section>
</div>

<div class="ScoreClass">
  <h2 id="TimeScoar"></h2>
</div>

This is what I have for my body. Now I want to align the div class ScoreClass to the right, how is that possible? Can I exclude the div ScoreClass?

I would appreciate, if you could give me an answer. Jonathan

Answer

Set the position to the right in your CSS.

.ScoreClass {
  position: absolute;
  right: 0%; /*sets element all the way to the right (adjust percentage to your need)*/
}