📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials Bootstrap 5 Bootstrap RTL Support

Bootstrap RTL Support

4 min read
Enable RTL with bootstrap.rtl.min.css and dir=rtl — logical utilities (ms-, ps-) auto-flip.

RTL Support

<!-- RTL CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.rtl.min.css">

<!-- Enable RTL -->
<html lang="ar" dir="rtl">

<!-- Bootstrap mirrors automatically:
  ms-3 becomes margin-right in RTL
  text-start becomes right-aligned
  float-end becomes left float
-->

<!-- Logical utility classes -->
<div class="ms-3">  <!-- margin-start -->
<div class="ps-3">  <!-- padding-start -->
<div class="text-start"> <!-- left in LTR, right in RTL -->