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

223
Vistas
Aligning text to the right in Leaflet popup using HTML/CSS/JavaScript

I'm trying to align a value from a JSON table to the right in a Leaflet popup using the following code JavaScript:

    var popupContent = `<h3>${feature.properties.CDP_STATE}</h3><br>
         <h4>Socioeconomic Score:</h4><h5>${feature.properties.SE_WM}</h5><br>
         <h4>Composition & Disability Score:</h4><h5>${feature.properties.HCD_WM}</h5><br>

CSS:

h3 {
  font-family: "League Spartan", sans-serif;
  font-size:medium;
  font-weight: 400;
  text-align: left;
  letter-spacing: 1.5px;
  margin: 0;
}     

h4 {
  font-family: "IBM Plex Mono", sans-serif;
  font-size: 1em;
  font-weight:200;
  text-align: left;
  margin: 0;
}     

h5 {
  font-family: "IBM Plex Mono", sans-serif;
  font-size: 1em;
  font-weight:400;
  text-align: right;
  margin: 0;
}

It sort of works, the text is aligned right but breaks to a new line instead of being on the same line. Any thoughts on why this is happening?

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