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

238
Vistas
A div is bigger than what I made it

I am making a John Conway's game of life and when I try run it by pressing space, it is actually bigger than what the console shows it to be. I set the div to be exactly 0.1% of the bigger grid which is in dark blue. But it seems to just be bigger or smaller. I also use panning and zooimng for the project

   * {
    padding: 0;
    margin: 0;
    outline: 0;
    overflow: hidden;
}
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: gray;
}
.main-grid{
    width: 100vw;
    height: 100vw;  
    background-color: rgb(0, 0, 0);

   
}



.hover:hover{
    transition: 0.3s;
    background-color: rgb(79, 124, 182);
    transform: scale(1.2);
}

.on{
    position: fixed;
    height: 0.1%;
    width: 0.1%;
    background-color: white;
    
    
}
 <body>
        <div class="main-grid">     
        </div>   
        <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="crossorigin="anonymous"></script>
         <script src='https://unpkg.com/panzoom@9.4.0/dist/panzoom.min.js'></script>
        <script src="app.js"></script>
  </body>

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

0

Have you tried Include

  • { box-sizing: border-box; }
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