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

234
Visualizações
How to make the dropdown menu in <select> center or make the text incenter?

I'm trying to make my site look more visually pleasing and the dropdown bar is really messing it up, here's what it looks like right now:

jsfiddle

* {
  margin: 0;
  padding: 0;
}

#report_card {
  background-color: black;
  height: 5rem;
  padding-top: 1rem;
}

#report_name {
  display: block;
  margin: auto;
  padding: 0.5rem;
  width: 12rem;
  text-align: center;
}
<div id="report_card">
  <select id="report_name" align="center">
    <option>option 1</option>
    <option>option 2</option>
    <option>reaaaaaaaaalllllllyyyyyyyyyy long option 3</option>
  </select>
</div>

I was hoping there is solution that would ideally be close to either of these 2:

  1. The dropdown is centered
    enter image description here

  2. The dropdown Text is centered with ellipsis
    enter image description here

But I'm also open to other suggestions of making the dropdown menu more better looking and please o please try not to use JavaScript unless absolutely necessary, the ideal case would be a css based solution

Edit: I'm also not looking for custom made dropdown menus

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