javascript - Is it possible to use the page scrollbar to scroll an inner div? -
i have website has fixed height , scrollable div inside that. possible remove inner scrollbar , change pages' one? current example scrollbar inside div here.
i suspect might need done javascript , search on stack overflow shows number of entries referring i'm kind of hoping doesn't need done using javascript.
currently, let users scroll inside div it's not elegant solution:
.singlepost { position: fixed; top: 270px; bottom: 20px; background-color: white; padding-left: 20px; padding-right: 20px; overflow-x: hidden; }
you set every other element on page position: fixed
, leaving div expand body , make scrollable. check fiddle example:
http://jsfiddle.net/gyatesiii/tnzg5/4/
the next web uses similar tactic.
Comments
Post a Comment