Bootstrap 5.3.8 • Chapter 20 • Responsive LTR + RTL
Select Menus
Every topic includes its own Bootstrap coding example, explanation, ten teaching examples, expected result, practice, and responsive Persian/Arabic checks.
20.1 form-select
form-select is part of Bootstrap 5.3.8 covered in Chapter 20. Read the Bootstrap class names as a layer over CSS layout, spacing, components, utilities, and JavaScript behavior rather than as magic syntax. The example uses Bootstrap classes or APIs directly so you can connect the class name to its visual or interactive result.
For form-select in Chapter 20, inspect the DOM structure, Bootstrap class names, responsive breakpoint, and any data-bs attributes or JavaScript initialization. When Google Translate is active, also verify that longer labels wrap and the correct LTR or RTL Bootstrap stylesheet is enabled.
Test form-select at phone, tablet, laptop, and wide-screen sizes. Then translate the example to Persian and Arabic, increase browser zoom, and inspect whether rows, columns, forms, menus, overlays, and labels remain inside the viewport.
Concept in plain language
form-select is part of Bootstrap 5.3.8 covered in Chapter 20. Read the Bootstrap class names as a layer over CSS layout, spacing, components, utilities, and JavaScript behavior rather than as magic syntax.
10 teaching examples
Example 1: Minimal component
Build the smallest lesson page that demonstrates form-select. Keep the Bootstrap classes visible in the markup and explain which class provides the behavior. Chapter 20, topic 1, example 1.
Example 2: Responsive variation
Add a breakpoint-specific class to the admin page example for form-select. Compare the mobile layout with the tablet or desktop layout. Chapter 20, topic 1, example 2.
Example 3: Long translation
Replace a short English label in the booking page with a much longer translated label while using form-select. Confirm wrapping does not widen the viewport. Chapter 20, topic 1, example 3.
Example 4: Persian test
Translate the course page to Persian. Verify start/end spacing, text alignment, component direction, and that the Bootstrap RTL stylesheet is active. Chapter 20, topic 1, example 4.
Example 5: Arabic test
Translate the dashboard to Arabic. Check buttons, forms, dropdowns, navigation, and offcanvas placement for correct RTL behavior. Chapter 20, topic 1, example 5.
Example 6: Accessibility review
Use form-select in the profile screen and verify semantic HTML, accessible names, keyboard interaction, focus visibility, and status messaging. Chapter 20, topic 1, example 6.
Example 7: Content stress
Add long text, nested controls, wide media, and narrow viewport width to the checkout. Adjust the Bootstrap structure without hiding meaningful content. Chapter 20, topic 1, example 7.
Example 8: Utility comparison
Rebuild one part of the contact form using Bootstrap utilities instead of custom CSS, then compare readability and maintainability. Chapter 20, topic 1, example 8.
Example 9: JavaScript-state test
If form-select uses Bootstrap JavaScript, test open, close, focus, disposal, and repeated initialization in the article. If not, verify the example works without JavaScript. Chapter 20, topic 1, example 9.
Example 10: Production review
Review form-select in the settings panel for breakpoints, RTL, Google Translate, zoom, keyboard use, performance, and maintainable class choices. Chapter 20, topic 1, example 10.
Bootstrap coding example
<select class="form-select" aria-label="Course"><option>HTML</option><option>CSS</option></select>Step-by-step code explanation
- Identify the Bootstrap class, data attribute, or JavaScript API used for form-select.
- Read the HTML nesting first. Bootstrap components often depend on a specific relationship between wrappers, controls, and content.
- Resize the viewport and observe which responsive classes become active at each breakpoint.
- Translate the visible content. Long labels must wrap, .row children must be able to shrink, and tables should use a local responsive wrapper instead of widening the page.
- Switch to Persian or Arabic and confirm that the page has dir=rtl, Bootstrap's RTL stylesheet is active, start/end utilities behave correctly, and code examples remain LTR.
Expected result: The browser demonstrates form-select with responsive behavior. Persian and Arabic use RTL layout without creating page-wide horizontal scrolling; genuinely wide code or tables scroll locally.
Practice exercise
Build a new Bootstrap 5.3.8 example for form-select from Chapter 20. Test it at 320px, 768px, and desktop width, translate its visible text to Persian and Arabic, and explain which Bootstrap classes or JavaScript API create the final behavior.
20.2 Select Sizing
Select Sizing is part of Bootstrap 5.3.8 covered in Chapter 20. Read the Bootstrap class names as a layer over CSS layout, spacing, components, utilities, and JavaScript behavior rather than as magic syntax. The example uses Bootstrap classes or APIs directly so you can connect the class name to its visual or interactive result.
For Select Sizing in Chapter 20, inspect the DOM structure, Bootstrap class names, responsive breakpoint, and any data-bs attributes or JavaScript initialization. When Google Translate is active, also verify that longer labels wrap and the correct LTR or RTL Bootstrap stylesheet is enabled.
Test Select Sizing at phone, tablet, laptop, and wide-screen sizes. Then translate the example to Persian and Arabic, increase browser zoom, and inspect whether rows, columns, forms, menus, overlays, and labels remain inside the viewport.
Concept in plain language
Select Sizing is part of Bootstrap 5.3.8 covered in Chapter 20. Read the Bootstrap class names as a layer over CSS layout, spacing, components, utilities, and JavaScript behavior rather than as magic syntax.
10 teaching examples
Example 1: Minimal component
Build the smallest booking page that demonstrates Select Sizing. Keep the Bootstrap classes visible in the markup and explain which class provides the behavior. Chapter 20, topic 2, example 1.
Example 2: Responsive variation
Add a breakpoint-specific class to the course page example for Select Sizing. Compare the mobile layout with the tablet or desktop layout. Chapter 20, topic 2, example 2.
Example 3: Long translation
Replace a short English label in the dashboard with a much longer translated label while using Select Sizing. Confirm wrapping does not widen the viewport. Chapter 20, topic 2, example 3.
Example 4: Persian test
Translate the profile screen to Persian. Verify start/end spacing, text alignment, component direction, and that the Bootstrap RTL stylesheet is active. Chapter 20, topic 2, example 4.
Example 5: Arabic test
Translate the checkout to Arabic. Check buttons, forms, dropdowns, navigation, and offcanvas placement for correct RTL behavior. Chapter 20, topic 2, example 5.
Example 6: Accessibility review
Use Select Sizing in the contact form and verify semantic HTML, accessible names, keyboard interaction, focus visibility, and status messaging. Chapter 20, topic 2, example 6.
Example 7: Content stress
Add long text, nested controls, wide media, and narrow viewport width to the article. Adjust the Bootstrap structure without hiding meaningful content. Chapter 20, topic 2, example 7.
Example 8: Utility comparison
Rebuild one part of the settings panel using Bootstrap utilities instead of custom CSS, then compare readability and maintainability. Chapter 20, topic 2, example 8.
Example 9: JavaScript-state test
If Select Sizing uses Bootstrap JavaScript, test open, close, focus, disposal, and repeated initialization in the gallery. If not, verify the example works without JavaScript. Chapter 20, topic 2, example 9.
Example 10: Production review
Review Select Sizing in the support page for breakpoints, RTL, Google Translate, zoom, keyboard use, performance, and maintainable class choices. Chapter 20, topic 2, example 10.
Bootstrap coding example
<select class="form-select form-select-lg"><option>Large select</option></select>Step-by-step code explanation
- Identify the Bootstrap class, data attribute, or JavaScript API used for Select Sizing.
- Read the HTML nesting first. Bootstrap components often depend on a specific relationship between wrappers, controls, and content.
- Resize the viewport and observe which responsive classes become active at each breakpoint.
- Translate the visible content. Long labels must wrap, .row children must be able to shrink, and tables should use a local responsive wrapper instead of widening the page.
- Switch to Persian or Arabic and confirm that the page has dir=rtl, Bootstrap's RTL stylesheet is active, start/end utilities behave correctly, and code examples remain LTR.
Expected result: The browser demonstrates Select Sizing with responsive behavior. Persian and Arabic use RTL layout without creating page-wide horizontal scrolling; genuinely wide code or tables scroll locally.
Practice exercise
Build a new Bootstrap 5.3.8 example for Select Sizing from Chapter 20. Test it at 320px, 768px, and desktop width, translate its visible text to Persian and Arabic, and explain which Bootstrap classes or JavaScript API create the final behavior.
20.3 Multiple Select
Multiple Select is part of Bootstrap 5.3.8 covered in Chapter 20. Read the Bootstrap class names as a layer over CSS layout, spacing, components, utilities, and JavaScript behavior rather than as magic syntax. The example uses Bootstrap classes or APIs directly so you can connect the class name to its visual or interactive result.
For Multiple Select in Chapter 20, inspect the DOM structure, Bootstrap class names, responsive breakpoint, and any data-bs attributes or JavaScript initialization. When Google Translate is active, also verify that longer labels wrap and the correct LTR or RTL Bootstrap stylesheet is enabled.
Test Multiple Select at phone, tablet, laptop, and wide-screen sizes. Then translate the example to Persian and Arabic, increase browser zoom, and inspect whether rows, columns, forms, menus, overlays, and labels remain inside the viewport.
Concept in plain language
Multiple Select is part of Bootstrap 5.3.8 covered in Chapter 20. Read the Bootstrap class names as a layer over CSS layout, spacing, components, utilities, and JavaScript behavior rather than as magic syntax.
10 teaching examples
Example 1: Minimal component
Build the smallest dashboard that demonstrates Multiple Select. Keep the Bootstrap classes visible in the markup and explain which class provides the behavior. Chapter 20, topic 3, example 1.
Example 2: Responsive variation
Add a breakpoint-specific class to the profile screen example for Multiple Select. Compare the mobile layout with the tablet or desktop layout. Chapter 20, topic 3, example 2.
Example 3: Long translation
Replace a short English label in the checkout with a much longer translated label while using Multiple Select. Confirm wrapping does not widen the viewport. Chapter 20, topic 3, example 3.
Example 4: Persian test
Translate the contact form to Persian. Verify start/end spacing, text alignment, component direction, and that the Bootstrap RTL stylesheet is active. Chapter 20, topic 3, example 4.
Example 5: Arabic test
Translate the article to Arabic. Check buttons, forms, dropdowns, navigation, and offcanvas placement for correct RTL behavior. Chapter 20, topic 3, example 5.
Example 6: Accessibility review
Use Multiple Select in the settings panel and verify semantic HTML, accessible names, keyboard interaction, focus visibility, and status messaging. Chapter 20, topic 3, example 6.
Example 7: Content stress
Add long text, nested controls, wide media, and narrow viewport width to the gallery. Adjust the Bootstrap structure without hiding meaningful content. Chapter 20, topic 3, example 7.
Example 8: Utility comparison
Rebuild one part of the support page using Bootstrap utilities instead of custom CSS, then compare readability and maintainability. Chapter 20, topic 3, example 8.
Example 9: JavaScript-state test
If Multiple Select uses Bootstrap JavaScript, test open, close, focus, disposal, and repeated initialization in the event page. If not, verify the example works without JavaScript. Chapter 20, topic 3, example 9.
Example 10: Production review
Review Multiple Select in the analytics page for breakpoints, RTL, Google Translate, zoom, keyboard use, performance, and maintainable class choices. Chapter 20, topic 3, example 10.
Bootstrap coding example
<select class="form-select" multiple><option>One</option><option>Two</option></select>Step-by-step code explanation
- Identify the Bootstrap class, data attribute, or JavaScript API used for Multiple Select.
- Read the HTML nesting first. Bootstrap components often depend on a specific relationship between wrappers, controls, and content.
- Resize the viewport and observe which responsive classes become active at each breakpoint.
- Translate the visible content. Long labels must wrap, .row children must be able to shrink, and tables should use a local responsive wrapper instead of widening the page.
- Switch to Persian or Arabic and confirm that the page has dir=rtl, Bootstrap's RTL stylesheet is active, start/end utilities behave correctly, and code examples remain LTR.
Expected result: The browser demonstrates Multiple Select with responsive behavior. Persian and Arabic use RTL layout without creating page-wide horizontal scrolling; genuinely wide code or tables scroll locally.
Practice exercise
Build a new Bootstrap 5.3.8 example for Multiple Select from Chapter 20. Test it at 320px, 768px, and desktop width, translate its visible text to Persian and Arabic, and explain which Bootstrap classes or JavaScript API create the final behavior.
20.4 Disabled Select
Disabled Select is part of Bootstrap 5.3.8 covered in Chapter 20. Read the Bootstrap class names as a layer over CSS layout, spacing, components, utilities, and JavaScript behavior rather than as magic syntax. The example uses Bootstrap classes or APIs directly so you can connect the class name to its visual or interactive result.
For Disabled Select in Chapter 20, inspect the DOM structure, Bootstrap class names, responsive breakpoint, and any data-bs attributes or JavaScript initialization. When Google Translate is active, also verify that longer labels wrap and the correct LTR or RTL Bootstrap stylesheet is enabled.
Test Disabled Select at phone, tablet, laptop, and wide-screen sizes. Then translate the example to Persian and Arabic, increase browser zoom, and inspect whether rows, columns, forms, menus, overlays, and labels remain inside the viewport.
Concept in plain language
Disabled Select is part of Bootstrap 5.3.8 covered in Chapter 20. Read the Bootstrap class names as a layer over CSS layout, spacing, components, utilities, and JavaScript behavior rather than as magic syntax.
10 teaching examples
Example 1: Minimal component
Build the smallest checkout that demonstrates Disabled Select. Keep the Bootstrap classes visible in the markup and explain which class provides the behavior. Chapter 20, topic 4, example 1.
Example 2: Responsive variation
Add a breakpoint-specific class to the contact form example for Disabled Select. Compare the mobile layout with the tablet or desktop layout. Chapter 20, topic 4, example 2.
Example 3: Long translation
Replace a short English label in the article with a much longer translated label while using Disabled Select. Confirm wrapping does not widen the viewport. Chapter 20, topic 4, example 3.
Example 4: Persian test
Translate the settings panel to Persian. Verify start/end spacing, text alignment, component direction, and that the Bootstrap RTL stylesheet is active. Chapter 20, topic 4, example 4.
Example 5: Arabic test
Translate the gallery to Arabic. Check buttons, forms, dropdowns, navigation, and offcanvas placement for correct RTL behavior. Chapter 20, topic 4, example 5.
Example 6: Accessibility review
Use Disabled Select in the support page and verify semantic HTML, accessible names, keyboard interaction, focus visibility, and status messaging. Chapter 20, topic 4, example 6.
Example 7: Content stress
Add long text, nested controls, wide media, and narrow viewport width to the event page. Adjust the Bootstrap structure without hiding meaningful content. Chapter 20, topic 4, example 7.
Example 8: Utility comparison
Rebuild one part of the analytics page using Bootstrap utilities instead of custom CSS, then compare readability and maintainability. Chapter 20, topic 4, example 8.
Example 9: JavaScript-state test
If Disabled Select uses Bootstrap JavaScript, test open, close, focus, disposal, and repeated initialization in the account page. If not, verify the example works without JavaScript. Chapter 20, topic 4, example 9.
Example 10: Production review
Review Disabled Select in the lesson page for breakpoints, RTL, Google Translate, zoom, keyboard use, performance, and maintainable class choices. Chapter 20, topic 4, example 10.
Bootstrap coding example
<select class="form-select" disabled><option>Disabled select</option></select>Step-by-step code explanation
- Identify the Bootstrap class, data attribute, or JavaScript API used for Disabled Select.
- Read the HTML nesting first. Bootstrap components often depend on a specific relationship between wrappers, controls, and content.
- Resize the viewport and observe which responsive classes become active at each breakpoint.
- Translate the visible content. Long labels must wrap, .row children must be able to shrink, and tables should use a local responsive wrapper instead of widening the page.
- Switch to Persian or Arabic and confirm that the page has dir=rtl, Bootstrap's RTL stylesheet is active, start/end utilities behave correctly, and code examples remain LTR.
Expected result: The browser demonstrates Disabled Select with responsive behavior. Persian and Arabic use RTL layout without creating page-wide horizontal scrolling; genuinely wide code or tables scroll locally.
Practice exercise
Build a new Bootstrap 5.3.8 example for Disabled Select from Chapter 20. Test it at 320px, 768px, and desktop width, translate its visible text to Persian and Arabic, and explain which Bootstrap classes or JavaScript API create the final behavior.
20.5 Accessible Select Labels
Accessible Select Labels is part of Bootstrap 5.3.8 covered in Chapter 20. Read the Bootstrap class names as a layer over CSS layout, spacing, components, utilities, and JavaScript behavior rather than as magic syntax. The example uses Bootstrap classes or APIs directly so you can connect the class name to its visual or interactive result.
For Accessible Select Labels in Chapter 20, inspect the DOM structure, Bootstrap class names, responsive breakpoint, and any data-bs attributes or JavaScript initialization. When Google Translate is active, also verify that longer labels wrap and the correct LTR or RTL Bootstrap stylesheet is enabled.
Test Accessible Select Labels at phone, tablet, laptop, and wide-screen sizes. Then translate the example to Persian and Arabic, increase browser zoom, and inspect whether rows, columns, forms, menus, overlays, and labels remain inside the viewport.
Concept in plain language
Accessible Select Labels is part of Bootstrap 5.3.8 covered in Chapter 20. Read the Bootstrap class names as a layer over CSS layout, spacing, components, utilities, and JavaScript behavior rather than as magic syntax.
10 teaching examples
Example 1: Minimal component
Build the smallest article that demonstrates Accessible Select Labels. Keep the Bootstrap classes visible in the markup and explain which class provides the behavior. Chapter 20, topic 5, example 1.
Example 2: Responsive variation
Add a breakpoint-specific class to the settings panel example for Accessible Select Labels. Compare the mobile layout with the tablet or desktop layout. Chapter 20, topic 5, example 2.
Example 3: Long translation
Replace a short English label in the gallery with a much longer translated label while using Accessible Select Labels. Confirm wrapping does not widen the viewport. Chapter 20, topic 5, example 3.
Example 4: Persian test
Translate the support page to Persian. Verify start/end spacing, text alignment, component direction, and that the Bootstrap RTL stylesheet is active. Chapter 20, topic 5, example 4.
Example 5: Arabic test
Translate the event page to Arabic. Check buttons, forms, dropdowns, navigation, and offcanvas placement for correct RTL behavior. Chapter 20, topic 5, example 5.
Example 6: Accessibility review
Use Accessible Select Labels in the analytics page and verify semantic HTML, accessible names, keyboard interaction, focus visibility, and status messaging. Chapter 20, topic 5, example 6.
Example 7: Content stress
Add long text, nested controls, wide media, and narrow viewport width to the account page. Adjust the Bootstrap structure without hiding meaningful content. Chapter 20, topic 5, example 7.
Example 8: Utility comparison
Rebuild one part of the lesson page using Bootstrap utilities instead of custom CSS, then compare readability and maintainability. Chapter 20, topic 5, example 8.
Example 9: JavaScript-state test
If Accessible Select Labels uses Bootstrap JavaScript, test open, close, focus, disposal, and repeated initialization in the admin page. If not, verify the example works without JavaScript. Chapter 20, topic 5, example 9.
Example 10: Production review
Review Accessible Select Labels in the booking page for breakpoints, RTL, Google Translate, zoom, keyboard use, performance, and maintainable class choices. Chapter 20, topic 5, example 10.
Bootstrap coding example
<label for="course" class="form-label">Course</label><select id="course" class="form-select"><option>Bootstrap</option></select>Step-by-step code explanation
- Identify the Bootstrap class, data attribute, or JavaScript API used for Accessible Select Labels.
- Read the HTML nesting first. Bootstrap components often depend on a specific relationship between wrappers, controls, and content.
- Resize the viewport and observe which responsive classes become active at each breakpoint.
- Translate the visible content. Long labels must wrap, .row children must be able to shrink, and tables should use a local responsive wrapper instead of widening the page.
- Switch to Persian or Arabic and confirm that the page has dir=rtl, Bootstrap's RTL stylesheet is active, start/end utilities behave correctly, and code examples remain LTR.
Expected result: The browser demonstrates Accessible Select Labels with responsive behavior. Persian and Arabic use RTL layout without creating page-wide horizontal scrolling; genuinely wide code or tables scroll locally.
Practice exercise
Build a new Bootstrap 5.3.8 example for Accessible Select Labels from Chapter 20. Test it at 320px, 768px, and desktop width, translate its visible text to Persian and Arabic, and explain which Bootstrap classes or JavaScript API create the final behavior.
Chapter 20 review — 10 questions and answers
1. What should you inspect when form-select does not behave as expected?
Answer: Check the Bootstrap classes, breakpoint, DOM structure, loaded CSS version, and any JavaScript data attributes involved in form-select. Then inspect computed styles to see which declaration wins.
2. How should form-select be tested before publishing?
Answer: Test form-select on narrow and wide screens, with long translated text, in Persian and Arabic RTL mode, at increased zoom, and with keyboard navigation where the component is interactive.
3. What should you inspect when Select Sizing does not behave as expected?
Answer: Check the Bootstrap classes, breakpoint, DOM structure, loaded CSS version, and any JavaScript data attributes involved in Select Sizing. Then inspect computed styles to see which declaration wins.
4. How should Select Sizing be tested before publishing?
Answer: Test Select Sizing on narrow and wide screens, with long translated text, in Persian and Arabic RTL mode, at increased zoom, and with keyboard navigation where the component is interactive.
5. What should you inspect when Multiple Select does not behave as expected?
Answer: Check the Bootstrap classes, breakpoint, DOM structure, loaded CSS version, and any JavaScript data attributes involved in Multiple Select. Then inspect computed styles to see which declaration wins.
6. How should Multiple Select be tested before publishing?
Answer: Test Multiple Select on narrow and wide screens, with long translated text, in Persian and Arabic RTL mode, at increased zoom, and with keyboard navigation where the component is interactive.
7. What should you inspect when Disabled Select does not behave as expected?
Answer: Check the Bootstrap classes, breakpoint, DOM structure, loaded CSS version, and any JavaScript data attributes involved in Disabled Select. Then inspect computed styles to see which declaration wins.
8. How should Disabled Select be tested before publishing?
Answer: Test Disabled Select on narrow and wide screens, with long translated text, in Persian and Arabic RTL mode, at increased zoom, and with keyboard navigation where the component is interactive.
9. What should you inspect when Accessible Select Labels does not behave as expected?
Answer: Check the Bootstrap classes, breakpoint, DOM structure, loaded CSS version, and any JavaScript data attributes involved in Accessible Select Labels. Then inspect computed styles to see which declaration wins.
10. How should Accessible Select Labels be tested before publishing?
Answer: Test Accessible Select Labels on narrow and wide screens, with long translated text, in Persian and Arabic RTL mode, at increased zoom, and with keyboard navigation where the component is interactive.