Mulli
Mulli

Reputation: 1708

How do I make horizontal scrollbar handler appear on the rightmost side, using only css?

I have a wide div

.wide-div{
    width: 3800px;
    overflow-x: auto;
    padding-right: 160px;
    white-space: nowrap;
    direction: rtl;
    text-align: right;
}

Its working BUT upon first display the scrollbar scroll location is at leftmost side.

How do I make it appear on the rightmost side, so that I can scroll to the left, using css only?

Upvotes: 0

Views: 60

Answers (1)

Sonia
Sonia

Reputation: 1919

You need to add direction: rtl to a parent div or body

body {
  direction: rtl;
}

Jsfiddle

Upvotes: 1

Related Questions