title: Draw a cloned element vertically
body: <p>I'm trying to draw a shape multiple times using <strong>java script</strong>, in my case i am drawing a circle. I made a function that duplicate my element based on my selector, but when it draw the shape again to the screen, It draws it <strong>horizontally</strong>, I want to make it draw <strong>vertically</strong>.</p>
  
  <p>I think the problem is the function is appending the element in the same place every time so that's why it draw it horizontally (correct me if i'm wrong) </p>
  
  <p>This is my code :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function duplicateCircle() {
      //let num =1
      let clone = document.querySelector('.circle').cloneNode( true );
      //clone.setAttribute( 'id', `cmt${++num}`)
      document.querySelector('#grph').appendChild( clone );
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.container{
      display: grid;
      width: 100%;
      height: 45vw;
      margin: auto;
      gap: 25px;
      border: 2px solid red;
  
      grid-template-columns: repeat(2);
      grid-template-rows: repeat(6,1fr);
  
      grid-template-areas: 
      "cmd cmd  grph grph grph grph "  
      "cmd cmd  grph grph grph grph "  
      "cmd cmd  grph grph grph grph "  
      "cmd cmd  grph grph grph grph "  
      "cmd cmd  grph grph grph grph "  
      "write write grph grph grph grph";
      
  }
  
  .box{
      display: flex;
      /*flex-direction: row;*/
      justify-content: center;
      border: 5px solid black;
  }
  
  
  
  .circle {
      height: 50px;
      width: 50px;
      background-color: blueviolet;
      border-radius: 50%;
      border: 3px solid black;
    }
  
    #command {grid-area: cmd;}
    #grph{grid-area: grph;}
    #write{grid-area: write;}</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
      &lt;link rel="stylesheet" href="/style/style.css"&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div class="container"&gt;
  
          &lt;div id="command" class="box"&gt;&lt;/div&gt;
  
          &lt;div id="grph" class="box"&gt;&lt;span class="circle"&gt;&lt;/span&gt;&lt;/div&gt;
  
          &lt;div id="write" class="box"&gt;
              &lt;button id="draw" onclick="duplicateCircle()"&gt;Draw&lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;script src="/scripts/functions.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>