0

Scroll for overflow-x by mousewheel

hi every body i have a div width overflow-x this div is my main div overflow-x work good , but when use mousewheel nothing happen how i can use mousewheel for scroll this element

.Main{
    display:block;
    margin: 0;
    padding: 0;
    overflow-x:scroll; overflow-y: hidden;
}
Pnsadeghy
  • 1,279
  • 1
  • 13
  • 20

1 Answers1

0

.Main should have content overflowing along x for you to be able to scroll.

See this demo

#two {
    border: 5px solid black;
    height: 200px; width: 20000px;
}
#one {
    border: 1px solid red;
    height: 200px; width: 200px;
    overflow-y: hidden; overflow-x:scroll;
}

<div id="one"><div id="two"></div></div>
Sourabh
  • 8,243
  • 10
  • 52
  • 98
  • 1
    i know that , scrolling horizontally work good ,my problem is scroll dont work with mousewheel , however tnx for your answer – Pnsadeghy Aug 28 '13 at 11:51
  • refer to this question: http://stackoverflow.com/questions/2346958/how-to-do-a-horizontal-scroll-on-mouse-wheel-scroll – Sourabh Aug 28 '13 at 11:54