Bootstrap 5 FormsLesson 35Free preview
BS5 Select Menus
This lesson is part of Bootstrap · All levels
Summary
<select> is given Bootstrap style with class .form-select, not .form-control, so that the arrow and tip display is typical of dropdown. The size is set to .form-select-sm or .form-select-lg, whereas the disabled attribute disables the option and the multiple attribute makes the double option.
Key points
- .form-select gives the style to the <select> element.
- .form-select-sm and .form-select-lg set the size.
- The disabled attribute disables select.
- The multiple attribute makes a double choice, usually with a size greater than 1.
- Use .form-label and .mb-3 for a neat layout.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.