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

231
Views
display:inline-block not aligning properly?

So I have been trying out using status bars with JavaScript and have come across this issue where it seems like when I use "display:inline-block" it doesn't align my two elements properly. When ran the "Stat:" appears lower than the progress bar even though they should be aligned. Any help or someone pointing out a dumb mistake a made would be appreciated.

document.getElementById("myBar").style.width = "50%";
#myProgress {
  width: 20%;
  background-color: #ddd;
  display: inline-block;
}

#myBar {
  width: 1%;
  height: 30px;
  background-color: #04AA6D;
}

h1 {
  font-size: 30px;
  font-family: Arial, Helvetica, sans-serif;
  display: inline;
}
<h1>Stat:</h1>
<div id="myProgress">
  <div id="myBar"></div>
</div>

about 4 years ago · Juan Pablo Isaza
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!