Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

235
Views
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 answers
Answer question

0

Have you tried Include

  • { box-sizing: border-box; }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!