how to move scrollbar from left to right in css?
Change direction from rtl
to ltr
in #font6
style.
For instance,
#font6 {
direction: ltr;
display: block;
height: 218px;
overflow: auto;
position: absolute;
right: 76px;
top: 15px;
width: 58%;
}
This will solve your issue.
Hope this Helps.
How to position a div scrollbar on the left hand side?
.list_container {
direction: rtl;
overflow:auto;
height: 50px;
width: 50px;
}
.item_direction {
direction:ltr;
}
<div class="list_container">
<div class="item_direction">1</div>
<div class="item_direction">2</div>
<div class="item_direction">3</div>
<div class="item_direction">4</div>
<div class="item_direction">5</div>
<div class="item_direction">6</div>
<div class="item_direction">7</div>
<div class="item_direction">8</div>
<div class="item_direction">9</div>
<div class="item_direction">10</div>
<div class="item_direction">11</div>
<div class="item_direction">12</div>
</div>
How to change scroll bar position with CSS?
Using CSS only:
Right/Left Flippiing: Working Fiddle
.Container
{
height: 200px;
overflow-x: auto;
}
.Content
{
height: 300px;
}
.Flipped
{
direction: rtl;
}
.Content
{
direction: ltr;
}
Top/Bottom Flipping: Working Fiddle
.Container
{
width: 200px;
overflow-y: auto;
}
.Content
{
width: 300px;
}
.Flipped, .Flipped .Content
{
transform:rotateX(180deg);
-ms-transform:rotateX(180deg); /* IE 9 */
-webkit-transform:rotateX(180deg); /* Safari and Chrome */
}
CSS vertical scrollbar padding left/right in UL possible?
You can see an example below, basically forget adding margin or padding there, just increase the width/height of scroll area, and decrease the width height of thumb/track.
Quoted from how to customise custom scroll?
body {
min-height: 1000px;
font-family: sans-serif;
}
div#container {
height: 200px;
width: 300px;
overflow: scroll;
border-radius: 5px;
margin: 10px;
border: 1px solid #AAAAAA;
}
div#content {
height: 1000px;
outline: none;
padding: 10px;
}
::-webkit-scrollbar {
width: 14px;
}
::-webkit-scrollbar-thumb {
border: 4px solid rgba(0, 0, 0, 0);
background-clip: padding-box;
border-radius: 9999px;
background-color: #AAAAAA;
}
<div id="container">
<div id="content" contenteditable>
Click to type...
</div>
</div>
Scroll horizontally starting from right to left with CSS overflow:scroll
You can of course use direction:rtl
document.querySelector('input').addEventListener('input', function(){ document.querySelector('.box').scrollLeft = this.value;})
.box{ width: 320px; height: 100px; border:1px solid red; overflow: scroll; direction: rtl; /* <-- the trick */}
.box::before{ content:''; display:block; width:400%; height:1px; }
<div class='box'></div><br><input placeholder='scrollLeft value'>
Move div scroll from right to left side of the scroll area
try 'direction: rtl;' in the div css.
but it will also affect the inner text, so put all the content in a wrapper div, and for the wrapper, change the direction back to ltr.
Html:
<div id="Container">
<div id="Content">
bla bla
</div>
</div>
CSS:
#Container
{
direction: rtl;
}
#Content
{
direction: ltr;
}
or combined
<div style="direction: rtl;">
<div style="direction: ltr;">
bla bla
</div>
</div>
How to move a scrollbar together with the left position of its div (possibly with React)
After pursuing this quest for another couple of days, I haven't been able to find examples of React hooks that are able to detect/manage the scroll of individual components in page, let alone horizontal scroll.
I have solved my problem by leaving CSS aside and putting in place a JS/DOM-based solution, catering to the Element methods that control scroll.
These React solutions are all based on using a useRef hook tied to the page Element that is to be controlled, and accessing its methods through the current
property of the reference.
The main drawback of these solutions is that (regardless of what the standards seem to promise) I cannot exploit CSS easing functions to implement a smooth scroll transition: for that I was forced to use a setInterval
/setTimeout
solution to perform many partial scrolls of my component.
Related Topics
Where to Add Global CSS in an Angular 2 Application Made with Visual Studio 2017 Angular Template
React Strap Cards Unable to Align Items According to The Screen Size
Nested Flexboxes Works Differently Across Browsers
Why Is There Excessive Whitespace with Facebook Mobile Comments Plugin
Increase a Div Size on Click with CSS Alone
How to Make Bootstrap Table Rows Clickable
How to Keep a Div Always on The Screen, But Not Always in a Fixed Position
Position Fixed Content Overlapping Problem
How to Make a Div Adopt The Height of The Screen
How to Center Images in a Responsive Grid with CSS Only and Supporting Retina Displays
CSS: Placing Divs Left/Center/Right Inside Header
Preventing High-Contrast Mode in Edge from Adding Background to Text
HTML/CSS - Div Element Hidden When It Shouldn't Be
Fixed Positioned Div Is Extending Outside of HTML & Body
Static Webpage on Nginx Docker Container Missing CSS
CSS Apply Styling to All Elements Except Those in The Last Row