Home > Article > Web Front-end > Can I Position a Div Scrollbar on the Left Side?
Positioning Div Scrollbar on the Left Side
Question:
Can the placement of a vertical scrollbar on a div be specified to the left-hand side? Is it possible to place the scrollbar on the left side of a scrollable area, as seen in this demonstration of the overflow attribute?
Answer:
To position the scrollbar on the left-hand side, the following CSS property can be used:
<code class="css">#scroll { direction: rtl; overflow: auto; height: 50px; width: 50px; }</code>
To reset the text direction within the inner div, the following CSS rule can be applied:
<code class="css">#scroll div { direction: ltr; }</code>
It should be noted that this approach has not been tested.
The above is the detailed content of Can I Position a Div Scrollbar on the Left Side?. For more information, please follow other related articles on the PHP Chinese website!