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

232
Vistas
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
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