Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

88
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda