Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

228
Views
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 answers
Answer question

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 Report

0

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

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

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!