Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

87
Views
Positioning image insert in Google Chrome extension

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.

  function imageappend() {
    const img = document.createElement("img");
    img.src = chrome.runtime.getURL("imageedit_1_3932659157.png");
    img.style.top = "0";
    img.style.left = "0";
    img.style.padding = "0";
    img.style.margin = "0";
    document.body.appendChild(img);
  }

  let [tab] = await chrome.tabs.query({ active: true, currentWindow: true });

  chrome.scripting.executeScript({
    target: { tabId: tab.id },
    function: imageappend
  });
})(); ```
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!