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

221
Vistas
Is there a way to select via CSS elements inside UMAP iframe?

I am displaying a uMap map in my website. Here it is :

<iframe id="umapiframe" class="iframe-umap" width="100%" height="300px" frameborder="0" allowfullscreen src="//umap.openstreetmap.fr/fr/map/agroavenir_665397?scaleControl=false&miniMap=false&scrollWheelZoom=false&zoomControl=true&allowEdit=false&moreControl=true&searchControl=null&tilelayersControl=null&embedControl=null&datalayersControl=true&onLoadPanel=none&captionBar=false"></iframe>

It actually looks pretty nice, except I really want to change some CSS inside. Here, I want to replace the navigation buttons to the corner bottom/right except the top/left :

enter image description here

As you can see, in the second picture, I've been able to modify localy the CSS just to see a potential result, and it's actually exactly what I want !

But the element is actually inside an iframe document, and through that, I can't reach the element I want to reach in my css file.

enter image description here

I am a bit frustrated to not be able to make permanent this kind of things, displaying perfectly in front of me...

Is there a way to reach via CSS selector the inside of this iframe ? Or, through an other way, moving those elements in the other corner ?

Thanks for reading

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

As far as i know, with CSS you can select only classes in the same document and iframe is a whole new document, so the answer would be that you can't. Maybe you can try to target it with javascript.

Code example:

document.querySelector('iframe').contentDocument.body.querySelector('#some-element').style.background-color = 'red';

Source: https://www.py4u.net/discuss/1050889

about 4 years ago · Juan Pablo Isaza Denunciar

0

You can get an element inside an iframe using this code:

const iframe = document.querySelector(/**iframe selector**/)
iframe.contentWindow.document.querySelector(/**element selector**/)

Then style it with js.

Related questions:

How to pick element inside iframe using document.getElementById

Get element from within an iFrame

about 4 years ago · Juan Pablo Isaza Denunciar
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