0

Scroll bar position in a div

asked 2019-04-23 02:32:44 +0800

andij62 gravatar image andij62
315 1 7

I have a container-div that contains several individual divs. The container-div contains an x-scrollbar. I would like to position the x-scrollbar via button. Is that possible?

.tab-list-container { height: 250px; height: 25rem; margin-bottom: 4rem;
overflow: hidden; background: transparent; text-align: center; }

.tab-list { height: 290px; height: 29rem; overflow-x: scroll; overflow-y: hidden; white-space: nowrap; }

            <div sclass ="tab-list-container" >             
                <hlayout style="text-align: center" sclass="tab-list">
                    <div width="200px">aaaa</div>
                    <div width="200px">bbbb</div>
                    <div width="200px">cccc</div>
                    <div width="200px">dddd</div>
                </hlayout>
            </div>
            <separator height="50px" />
            <div align="center" >
                <button id="btprev" />
                <button id="btnext" />
            </div>
delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-04-23 12:17:53 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

Clients.scrollIntoView() can help you. Please see http://zkfiddle.org/sample/3719an/1-Scroll-bar-position-in-a-div

link publish delete flag offensive edit

Comments

perfect! thank you!

andij62 ( 2019-04-23 19:19:26 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2019-04-23 02:32:44 +0800

Seen: 14 times

Last updated: Apr 23 '19

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More