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

1.9K
Views
Bootstrap 5 form-group, form-row, form-inline not working

I'm trying to update my app from Bootstrap 4 to Bootstrap 5, but all the elements that were using form classes such as form-group, form-row, form-inline are completely broken.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Because form-group, form-row, and form-inline classes have been removed in Bootstrap 5: I have resorted to using gy-. eg(gy-2)

<div class="card">
   <div class="card-body">
       <div class="row">
           <div class="col-lg-2 gy-2">
               <select class="form-control">
                   <option>invoice</option>
                   <option>qoutation</option>
               </select>
           </div>
           <div class="col-lg-2 gy-2">
               <select class="form-control product-select" name="state">
                   <option value="AL">Search Product..</option>
               </select>
           </div>
       </div>
   </div>
</div>

over 4 years ago · Santiago Trujillo Report

0

The reason is form-group, form-row, and form-inline classes have been removed in Bootstrap 5:

Breaking change: Dropped form-specific layout classes for our grid system. Use our grid and utilities instead of .form-group, .form-row, or .form-inline.

https://getbootstrap.com/docs/5.0/migration/#forms

So Grid and Utilities are supposed to be used instead.

...but if you are looking for a quick solution, here's how these classes were working in Bootstrap 4:

.form-group {
  margin-bottom: 1rem;
}

.form-inline .form-control {
  display: inline-block;
  width: auto;
  vertical-align: middle;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -5px;
  margin-left: -5px;
}

label {
  margin-bottom: 0.5rem;
}
over 4 years ago · Santiago Trujillo 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!