2
Usually when you use overflow-y: scroll
or overflow-y:auto
, the scrollbar 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 place a certain element aligned to the right and therefore wish that the scrollbar appears to the left.
How can I do this with css?
Man, liked, interesting. But would have how to do without the text align the right?
– Wallace Maxters
Does not work on safari
– user60252
@Wallacemaxters
text-align: left;
– Sergio
Something new does not work in Safari :p
– Wallace Maxters
hehehehehehe, it’s true, just for the sake of compatibility
– user60252