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

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