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

277
Vistas
How to make an iframe 100% the width of parent container and scrollable along with the page

So i have a page that looks like this, the blue area is an iframe embedded from another endpoint on the same app.

withsidebar

when i collapse the sidebar the iframe remains the same size.

without sidebar

What i am trying to achieve is to display the full contents of the iframe without having to scroll horizontally. I also wanna get rid of those scrollbars and make the page look like it exists there.

Here is the relevant code

oncomine.html

{% extends "layout.html" %}

{% block title %}
    oncomine
{% endblock %}



{% block main %}

<div class='parent'>
    <iframe class="piframe" src="/dashboard/oncomine/" style="border: none;" width="600" height="600"/>
</div>


{% endblock %}

style.css

/* iframes */
.parent {
  position: relative;
  overflow: hidden;
  width: 103%;
  padding-top: 61.89%;
  margin-left: 0%;
}

.piframe {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
}

No css has been applied to the parent container of .parent.

Here is the gist link to the full html and css code gist

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