VOOZH about

URL: https://www.geeksforgeeks.org/css/spectre-forms-horizontal-forms/

⇱ Spectre Forms Horizontal forms - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Spectre Forms Horizontal forms

Last Updated : 23 Jul, 2025

Spectre Forms Horizontal forms are horizontal forms if you want to create a horizontal form then you have to use the form-horizontal class in form element. For each fields in the form you can use  col-* and col-xs/sm/lg/xl-* class to the child elements for responsive form row layout. Here the * can be replaceable by 1 to 12 any number you want based on the width of the field you want.

Forms Horizontal forms Classes:

  • form-horizontal: This class is used to create horizontal form.

Syntax:

 <form class="form-horizontal">
 ....
 </form>

Example: Here we will create a simple feedback form, remember one thing button is not the part of form in Spectre, here we will use button in the form as well.

Output:

👁 Spectre Forms Horizontal forms
Spectre Forms Horizontal forms

Reference: https://picturepan2.github.io/spectre/elements/forms.html#forms-horizontal

Comment