Normally when using overflow-y: scroll
or overflow-y:auto
, the scroll bar appears to the right of the element.
.scroll-me{
height: 80px;
width: 200px;
overflow-y: auto;
overflow-x: hidden;
font-size: 18px;
}
<div class="scroll-me">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
<br>
Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
I however need to put a certain element right-aligned, so I wish the scrollbar appears to the left.
How can I do this with css?