🎓 EASYTUTORGUIDE

Practical tutorials, tools, courses, digital skills, and business promotion.

★ Free Learning
Translate this lesson:
Persian and Arabic automatically enable Bootstrap RTL CSS. Long translated content remains responsive; code stays LTR.

Bootstrap 5.3.8 • Chapter 8 • Responsive LTR + RTL

Flex Utilities

Every topic includes its own Bootstrap coding example, explanation, ten teaching examples, expected result, practice, and responsive Persian/Arabic checks.

5 topics5 coding examples50 teaching examples10 Q&A
Estimated reading time · 0% read

8.1 Flex Direction

Flex Direction is part of Bootstrap 5.3.8 covered in Chapter 8. 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 Flex Direction in Chapter 8, 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 Flex Direction 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

Flex Direction is part of Bootstrap 5.3.8 covered in Chapter 8. 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

  1. Example 1: Minimal component

    Build the smallest lesson page that demonstrates Flex Direction. Keep the Bootstrap classes visible in the markup and explain which class provides the behavior. Chapter 8, topic 1, example 1.

  2. Example 2: Responsive variation

    Add a breakpoint-specific class to the admin page example for Flex Direction. Compare the mobile layout with the tablet or desktop layout. Chapter 8, topic 1, example 2.

  3. Example 3: Long translation

    Replace a short English label in the booking page with a much longer translated label while using Flex Direction. Confirm wrapping does not widen the viewport. Chapter 8, topic 1, example 3.

  4. 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 8, topic 1, example 4.

  5. Example 5: Arabic test

    Translate the dashboard to Arabic. Check buttons, forms, dropdowns, navigation, and offcanvas placement for correct RTL behavior. Chapter 8, topic 1, example 5.

  6. Example 6: Accessibility review

    Use Flex Direction in the profile screen and verify semantic HTML, accessible names, keyboard interaction, focus visibility, and status messaging. Chapter 8, topic 1, example 6.

  7. 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 8, topic 1, example 7.

  8. Example 8: Utility comparison

    Rebuild one part of the contact form using Bootstrap utilities instead of custom CSS, then compare readability and maintainability. Chapter 8, topic 1, example 8.

  9. Example 9: JavaScript-state test

    If Flex Direction uses Bootstrap JavaScript, test open, close, focus, disposal, and repeated initialization in the article. If not, verify the example works without JavaScript. Chapter 8, topic 1, example 9.

  10. Example 10: Production review

    Review Flex Direction in the settings panel for breakpoints, RTL, Google Translate, zoom, keyboard use, performance, and maintainable class choices. Chapter 8, topic 1, example 10.

Bootstrap coding example

<div class="d-flex flex-column flex-md-row gap-2"><div class="p-2 border">A</div><div class="p-2 border">B</div></div>

Step-by-step code explanation

  1. Identify the Bootstrap class, data attribute, or JavaScript API used for Flex Direction.
  2. Read the HTML nesting first. Bootstrap components often depend on a specific relationship between wrappers, controls, and content.
  3. Resize the viewport and observe which responsive classes become active at each breakpoint.
  4. 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.
  5. 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 Flex Direction 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 Flex Direction from Chapter 8. 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.

8.2 Flex Wrap

Flex Wrap is part of Bootstrap 5.3.8 covered in Chapter 8. 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 Flex Wrap in Chapter 8, 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 Flex Wrap 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

Flex Wrap is part of Bootstrap 5.3.8 covered in Chapter 8. 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

  1. Example 1: Minimal component

    Build the smallest booking page that demonstrates Flex Wrap. Keep the Bootstrap classes visible in the markup and explain which class provides the behavior. Chapter 8, topic 2, example 1.

  2. Example 2: Responsive variation

    Add a breakpoint-specific class to the course page example for Flex Wrap. Compare the mobile layout with the tablet or desktop layout. Chapter 8, topic 2, example 2.

  3. Example 3: Long translation

    Replace a short English label in the dashboard with a much longer translated label while using Flex Wrap. Confirm wrapping does not widen the viewport. Chapter 8, topic 2, example 3.

  4. 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 8, topic 2, example 4.

  5. Example 5: Arabic test

    Translate the checkout to Arabic. Check buttons, forms, dropdowns, navigation, and offcanvas placement for correct RTL behavior. Chapter 8, topic 2, example 5.

  6. Example 6: Accessibility review

    Use Flex Wrap in the contact form and verify semantic HTML, accessible names, keyboard interaction, focus visibility, and status messaging. Chapter 8, topic 2, example 6.

  7. 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 8, topic 2, example 7.

  8. Example 8: Utility comparison

    Rebuild one part of the settings panel using Bootstrap utilities instead of custom CSS, then compare readability and maintainability. Chapter 8, topic 2, example 8.

  9. Example 9: JavaScript-state test

    If Flex Wrap uses Bootstrap JavaScript, test open, close, focus, disposal, and repeated initialization in the gallery. If not, verify the example works without JavaScript. Chapter 8, topic 2, example 9.

  10. Example 10: Production review

    Review Flex Wrap in the support page for breakpoints, RTL, Google Translate, zoom, keyboard use, performance, and maintainable class choices. Chapter 8, topic 2, example 10.

Bootstrap coding example

<div class="d-flex flex-wrap gap-2"><div class="p-2 border">A</div><div class="p-2 border">B</div></div>

Step-by-step code explanation

  1. Identify the Bootstrap class, data attribute, or JavaScript API used for Flex Wrap.
  2. Read the HTML nesting first. Bootstrap components often depend on a specific relationship between wrappers, controls, and content.
  3. Resize the viewport and observe which responsive classes become active at each breakpoint.
  4. 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.
  5. 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 Flex Wrap 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 Flex Wrap from Chapter 8. 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.

8.3 Justify Content

Justify Content is part of Bootstrap 5.3.8 covered in Chapter 8. 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 Justify Content in Chapter 8, 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 Justify Content 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

Justify Content is part of Bootstrap 5.3.8 covered in Chapter 8. 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

  1. Example 1: Minimal component

    Build the smallest dashboard that demonstrates Justify Content. Keep the Bootstrap classes visible in the markup and explain which class provides the behavior. Chapter 8, topic 3, example 1.

  2. Example 2: Responsive variation

    Add a breakpoint-specific class to the profile screen example for Justify Content. Compare the mobile layout with the tablet or desktop layout. Chapter 8, topic 3, example 2.

  3. Example 3: Long translation

    Replace a short English label in the checkout with a much longer translated label while using Justify Content. Confirm wrapping does not widen the viewport. Chapter 8, topic 3, example 3.

  4. 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 8, topic 3, example 4.

  5. Example 5: Arabic test

    Translate the article to Arabic. Check buttons, forms, dropdowns, navigation, and offcanvas placement for correct RTL behavior. Chapter 8, topic 3, example 5.

  6. Example 6: Accessibility review

    Use Justify Content in the settings panel and verify semantic HTML, accessible names, keyboard interaction, focus visibility, and status messaging. Chapter 8, topic 3, example 6.

  7. 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 8, topic 3, example 7.

  8. Example 8: Utility comparison

    Rebuild one part of the support page using Bootstrap utilities instead of custom CSS, then compare readability and maintainability. Chapter 8, topic 3, example 8.

  9. Example 9: JavaScript-state test

    If Justify Content uses Bootstrap JavaScript, test open, close, focus, disposal, and repeated initialization in the event page. If not, verify the example works without JavaScript. Chapter 8, topic 3, example 9.

  10. Example 10: Production review

    Review Justify Content in the analytics page for breakpoints, RTL, Google Translate, zoom, keyboard use, performance, and maintainable class choices. Chapter 8, topic 3, example 10.

Bootstrap coding example

<div class="d-flex justify-content-between gap-2"><div class="p-2 border">A</div><div class="p-2 border">B</div></div>

Step-by-step code explanation

  1. Identify the Bootstrap class, data attribute, or JavaScript API used for Justify Content.
  2. Read the HTML nesting first. Bootstrap components often depend on a specific relationship between wrappers, controls, and content.
  3. Resize the viewport and observe which responsive classes become active at each breakpoint.
  4. 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.
  5. 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 Justify Content 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 Justify Content from Chapter 8. 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.

8.4 Align Items

Align Items is part of Bootstrap 5.3.8 covered in Chapter 8. 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 Align Items in Chapter 8, 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 Align Items 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

Align Items is part of Bootstrap 5.3.8 covered in Chapter 8. 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

  1. Example 1: Minimal component

    Build the smallest checkout that demonstrates Align Items. Keep the Bootstrap classes visible in the markup and explain which class provides the behavior. Chapter 8, topic 4, example 1.

  2. Example 2: Responsive variation

    Add a breakpoint-specific class to the contact form example for Align Items. Compare the mobile layout with the tablet or desktop layout. Chapter 8, topic 4, example 2.

  3. Example 3: Long translation

    Replace a short English label in the article with a much longer translated label while using Align Items. Confirm wrapping does not widen the viewport. Chapter 8, topic 4, example 3.

  4. 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 8, topic 4, example 4.

  5. Example 5: Arabic test

    Translate the gallery to Arabic. Check buttons, forms, dropdowns, navigation, and offcanvas placement for correct RTL behavior. Chapter 8, topic 4, example 5.

  6. Example 6: Accessibility review

    Use Align Items in the support page and verify semantic HTML, accessible names, keyboard interaction, focus visibility, and status messaging. Chapter 8, topic 4, example 6.

  7. 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 8, topic 4, example 7.

  8. Example 8: Utility comparison

    Rebuild one part of the analytics page using Bootstrap utilities instead of custom CSS, then compare readability and maintainability. Chapter 8, topic 4, example 8.

  9. Example 9: JavaScript-state test

    If Align Items uses Bootstrap JavaScript, test open, close, focus, disposal, and repeated initialization in the account page. If not, verify the example works without JavaScript. Chapter 8, topic 4, example 9.

  10. Example 10: Production review

    Review Align Items in the lesson page for breakpoints, RTL, Google Translate, zoom, keyboard use, performance, and maintainable class choices. Chapter 8, topic 4, example 10.

Bootstrap coding example

<div class="d-flex align-items-center gap-2" style="min-height:8rem"><div class="p-2 border">A</div><div class="p-2 border">B</div></div>

Step-by-step code explanation

  1. Identify the Bootstrap class, data attribute, or JavaScript API used for Align Items.
  2. Read the HTML nesting first. Bootstrap components often depend on a specific relationship between wrappers, controls, and content.
  3. Resize the viewport and observe which responsive classes become active at each breakpoint.
  4. 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.
  5. 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 Align Items 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 Align Items from Chapter 8. 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.

8.5 Auto Margins

Auto Margins is part of Bootstrap 5.3.8 covered in Chapter 8. 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 Auto Margins in Chapter 8, 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 Auto Margins 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

Auto Margins is part of Bootstrap 5.3.8 covered in Chapter 8. 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

  1. Example 1: Minimal component

    Build the smallest article that demonstrates Auto Margins. Keep the Bootstrap classes visible in the markup and explain which class provides the behavior. Chapter 8, topic 5, example 1.

  2. Example 2: Responsive variation

    Add a breakpoint-specific class to the settings panel example for Auto Margins. Compare the mobile layout with the tablet or desktop layout. Chapter 8, topic 5, example 2.

  3. Example 3: Long translation

    Replace a short English label in the gallery with a much longer translated label while using Auto Margins. Confirm wrapping does not widen the viewport. Chapter 8, topic 5, example 3.

  4. 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 8, topic 5, example 4.

  5. Example 5: Arabic test

    Translate the event page to Arabic. Check buttons, forms, dropdowns, navigation, and offcanvas placement for correct RTL behavior. Chapter 8, topic 5, example 5.

  6. Example 6: Accessibility review

    Use Auto Margins in the analytics page and verify semantic HTML, accessible names, keyboard interaction, focus visibility, and status messaging. Chapter 8, topic 5, example 6.

  7. 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 8, topic 5, example 7.

  8. Example 8: Utility comparison

    Rebuild one part of the lesson page using Bootstrap utilities instead of custom CSS, then compare readability and maintainability. Chapter 8, topic 5, example 8.

  9. Example 9: JavaScript-state test

    If Auto Margins uses Bootstrap JavaScript, test open, close, focus, disposal, and repeated initialization in the admin page. If not, verify the example works without JavaScript. Chapter 8, topic 5, example 9.

  10. Example 10: Production review

    Review Auto Margins in the booking page for breakpoints, RTL, Google Translate, zoom, keyboard use, performance, and maintainable class choices. Chapter 8, topic 5, example 10.

Bootstrap coding example

<div class="d-flex gap-2"><div class="p-2 border">A</div><div class="p-2 border ms-auto">End item</div></div>

Step-by-step code explanation

  1. Identify the Bootstrap class, data attribute, or JavaScript API used for Auto Margins.
  2. Read the HTML nesting first. Bootstrap components often depend on a specific relationship between wrappers, controls, and content.
  3. Resize the viewport and observe which responsive classes become active at each breakpoint.
  4. 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.
  5. 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 Auto Margins 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 Auto Margins from Chapter 8. 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 8 review — 10 questions and answers

1. What should you inspect when Flex Direction does not behave as expected?

Answer: Check the Bootstrap classes, breakpoint, DOM structure, loaded CSS version, and any JavaScript data attributes involved in Flex Direction. Then inspect computed styles to see which declaration wins.

2. How should Flex Direction be tested before publishing?

Answer: Test Flex Direction 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 Flex Wrap does not behave as expected?

Answer: Check the Bootstrap classes, breakpoint, DOM structure, loaded CSS version, and any JavaScript data attributes involved in Flex Wrap. Then inspect computed styles to see which declaration wins.

4. How should Flex Wrap be tested before publishing?

Answer: Test Flex Wrap 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 Justify Content does not behave as expected?

Answer: Check the Bootstrap classes, breakpoint, DOM structure, loaded CSS version, and any JavaScript data attributes involved in Justify Content. Then inspect computed styles to see which declaration wins.

6. How should Justify Content be tested before publishing?

Answer: Test Justify Content 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 Align Items does not behave as expected?

Answer: Check the Bootstrap classes, breakpoint, DOM structure, loaded CSS version, and any JavaScript data attributes involved in Align Items. Then inspect computed styles to see which declaration wins.

8. How should Align Items be tested before publishing?

Answer: Test Align Items 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 Auto Margins does not behave as expected?

Answer: Check the Bootstrap classes, breakpoint, DOM structure, loaded CSS version, and any JavaScript data attributes involved in Auto Margins. Then inspect computed styles to see which declaration wins.

10. How should Auto Margins be tested before publishing?

Answer: Test Auto Margins 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.