Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

224
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda