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
How to align items inside div horizontally without using flex

I want to align items horizontally without using flex. In below example I want label, input and span to be aligned horizontally. Cuurently display:flex which is there is working fine but I want without using flex

<div class="input-group" style="display: flex; align-items: center;">
<label style="width: 7rem; display: inline-block;">
<span class="control-label" style="color: rgb(64, 64, 64); font-family: Arial; font-size: 50px!important ;font-size: 15px; line-height: 1.5;">Email:</span>
<span class="mandatory">*</span>
<small class="smallExplain"></small>
</label>
<input class="form-control" type="email" name="emailId" placeholder="Email" required="" style="color: rgb(100, 96, 96); font-family: Arial; margin-bottom: 0px; width: 100%; padding: 0.375rem 0.75rem; line-height: 1.5; background-color: rgb(255, 255, 255); border: 3px solid rgb(0,0,0); border-radius:0.7rem !important; border-radius: 0.25rem;">
</div>
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

you can add margin-right: auto and margin-left: auto css manualy on your input, and label. For example:

style.css

label {
   margin-right: auto;
   margin-left: auto;
}

input {
   margin-right: auto;
   margin-left: auto;
}

let me know if its works.

about 4 years ago · Juan Pablo Isaza Denunciar

0

.input-group{ margin: "auto";}

Adding margin - auto can center the div without using flexbox.

about 4 years ago · Juan Pablo Isaza Denunciar
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