Bootstrap – RTL


Bootstrap – RTL



”;


This chapter discusses about RTL (right to left) support provided by Bootstrap. The RTL feature supports for right-to-left text across your layout, components and utilities.


Requirements

To enable RTL in pages powered by Bootstrap, you must fulfill the two requirements. They are as follows:

  • On <html> element, set dir-“rtl”.

  • On <html> element, add an appropriate lang attribute, such as lang=”ar”.


You need to include the RTL version of CSS. For example, here is a stylesheet with RTL enabled:


    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.rtl.min.css" integrity="sha384-PJsj/BTMqILvmcej7ulplguok8ag4xFTPryRq8xevL7eBYSmpXKcbNVuy+P0RMgq" crossorigin="anonymous">


Starter template

Following is a sample of starter template meeting the requirements for enabling RTL: