File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes problem with label scroll Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "problem with label scroll" Watch "problem with label scroll" New topic

problem with label scroll

simon tiberius

Joined: Oct 30, 2012
Posts: 29
I have a div. within this div, a label on top and many buttons under the said label (so many buttons that the div now has v-scrollbar). I want the label to stay where it is when scrolling the div down using this code:

it works fine, but it's not very smooth. sometimes the label is seen to be dragged up/down when scrolling before bouncing back to its original spot. how can I make it completely stay where it is without being dragged along with the scroll, not even a little? thanks
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
CSS position fixed
simon tiberius

Joined: Oct 30, 2012
Posts: 29
yes, tried that, but there's a problem when scrolling left or right. it stayed where it is. I just need it to scroll smoothly and stay fixed for vertical, not horizontal. thanks for the reply
I agree. Here's the link:
subject: problem with label scroll