Forum Moderators: not2easy

Message Too Old, No Replies

scrolling div using javascript

         

longboy

9:55 pm on Sep 25, 2007 (gmt 0)

10+ Year Member


i a wondering how can i make this working. my main div has a nested div which is bigger than main div but hidden and on both sides of that div is left and right arrow to scroll the div. i want my inner div scroll 500px to left when i press left button or scroll 500px to right when i press right button.

<div id="maindiv">
<div id="contentdiv">this div have some hidden portion</div>
</div>

#maindiv{
width: 500px;
height: 500px;
overflow: hidden;
}
#contentdiv{
width: 100px;
height: 500px;

}

thanks in advance

Marshall

12:25 am on Sep 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Would a simple solution be an iframe?

Marshall