/    Sign up×
Community /Pin to ProfileBookmark

Keep rows still

I have a div tag with a table in it. The div is set to scroll when the contents are too large for it.
Is it possible to get the top two rows of the table inside the div to stay still when scrolling is taking place? Thanks for any help.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@BillyRayAug 09.2004 — No - you'd have to split your table over 2 DIVs.

Dan
Copy linkTweet thisAlerts:
@WebskaterauthorAug 09.2004 — Thanks for your reply. I have already tried that but, because the bottom div gets scroll bars on it when it overflows, it seems to be impossible to keep the stuff in the top div (the table headings) in line with the appropriate cells in the rows in the table in the lower div. Is it possible to force the lower div to have scroll bars on whether it needs them or not?
Copy linkTweet thisAlerts:
@BillyRayAug 09.2004 — Are you using "overflow:scroll" to set the scrollbars? If so, try using "overflow-y:scroll" instead - this puts no horizontal scrollbar in. Either that, or use "overflow:auto" instead.

Hope this helps,

Dan
×

Success!

Help @Webskater spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...