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

240
Views
My animated div glitches upwards than back down during animation

I have made a basic div with a header and a paragraph inside of it and when I perform a multistep animation, the box glitches upwards than moves back down. It makes it look very glitchy and strange. You can view my error at https://jsfiddle.net/yajuy8qy/. Code:

<div class="enlarge">
    <h1 class="title">Welcome!</h1>
    <p>Zach</p>
    </div>
<script>
$(document).ready(function() {
$(".enlarge").animate({minHeight: '500px'}, "slow");
$(".enlarge").animate({width: '80%'}, "slow");
}); 
</script>
<style>
.enlarge {
height: 500px;
width: 50%;
background-color: #2098D1;
align-items: center;
align-content: center;
border-radius: 15px;
position: relative;
margin: 10px auto;
}
</style>

Thanks!

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

There seems to be an issue with the default padding property. Try setting the padding on the div (even 1px appears fixes the glitch).

.enlarge{
    padding: 1px;
}
over 4 years ago · Santiago Trujillo 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!