Sometimes, we want to position a div scrollbar on the left hand side with CSS.
In this article, we’ll look at how to position a div scrollbar on the left hand side with CSS.
How to position a div scrollbar on the left hand side with CSS?
To position a div scrollbar on the left hand side with CSS, we set the direction property.
For instance, we write
#scroll {
direction: rtl;
overflow: auto;
height: 50px;
width: 50px;
}
#scroll div {
direction: ltr;
}
to add direction: rtl;
to the element with ID scroll to make the text direction right to left, which puts the vertical scrollbar on the left side.
Conclusion
To position a div scrollbar on the left hand side with CSS, we set the direction property.