Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do padding left in bootstrap5?

In bootstrap4 we've used pl-5 for padding left, in bootstrap5 it is not working.

<div class="col-md-6 col-9 p-3 pl-5"> in bootstrap5 this code is not working
like image 756
Muhammed Yaseen Avatar asked Apr 18 '26 16:04

Muhammed Yaseen


1 Answers

According to the documentation the class names are ps- or pe- ... meaning start / end rather than left or right.

The reason is, that if you switch from RTL to LTR site your padding would still be applied from the correct side.

<div class="ps-2">I have a padding left on LTR and a padding right on RTL languages</div>
like image 150
cloned Avatar answered Apr 20 '26 07:04

cloned



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!