title: Positioning image insert in Google Chrome extension
body: <p>I was writing a Google Chrome extension to insert an image into the body of a website. It currently does that, but the image is centered all the way at the bottom, after the text of the website. I was wondering how to put it in the top left instead, or to use coordinates for the location. This is my code currently in JavaScript, as I can't use CSS for it.</p>
  <pre><code>  function imageappend() {
      const img = document.createElement(&quot;img&quot;);
      img.src = chrome.runtime.getURL(&quot;imageedit_1_3932659157.png&quot;);
      img.style.top = &quot;0&quot;;
      img.style.left = &quot;0&quot;;
      img.style.padding = &quot;0&quot;;
      img.style.margin = &quot;0&quot;;
      document.body.appendChild(img);
    }
  
    let [tab] = await chrome.tabs.query({ active: true, currentWindow: true });
  
    chrome.scripting.executeScript({
      target: { tabId: tab.id },
      function: imageappend
    });
  })(); ```
  </code></pre>