Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

236
Visualizações
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 Respostas
Responde à pergunta

0

Have you tried Include

  • { box-sizing: border-box; }
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda