Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

strange position of iScroll scrollbar

I'm building a touch-enabled html app and decided to use iScroll for scrolling within a div.

essentially, I've got two seperate scrolling divs but the scrollbars are always placed on the far outside of the page

http://jsfiddle.net/SRXMn/3/

the problem I'm having here is two-fold.

1) the scroll bars are both on the far right side (which doesn't make much sense for the left-scrolling content

2) the scroll bar extends all the way to the top of the header, when the only content being scrolled is below

when I set 'position:fixed' on the header, it shrinks down to a tiny size, and I can't seem to over-right that.

like image 569
pedalpete Avatar asked Jan 02 '12 12:01

pedalpete


People also ask

How do I change the scrollbar position?

We can use the CSS “::-webkit-scrollbar” property which is responsible for changing the shape, color, size, shade, shadow, etc. of the scroll bar. But, here the property which we will use is the direction property of CSS for changing the position of the scroll bar.

How can I see scrollbar position?

To get or set the scroll position of an element, you follow these steps: First, select the element using the selecting methods such as querySelector() . Second, access the scroll position of the element via the scrollLeft and scrollTop properties.

How do I set scroll position to zero?

If you want to set the scroll position of document. body , you can scroll the entire window altogether using window. scrollTo() ; it takes either a pair of coordinates (x,y) or an options object – if you just want to scroll nicely to the top, try window. scrollTo({top:0,behavior:'smooth'}); .


1 Answers

You could try using position:relative on div.scroll_hold

like image 101
Steef Avatar answered Sep 22 '22 01:09

Steef