/    Sign up×
Community /Pin to ProfileBookmark

column Names in div tag

How to show column names always visable,when scrolled vertically down?
as shown in attachment–test.html in test.zip,
i am getting column names not seen when scrolled vertically down.

i have 14 columns, and more number of rows that come dynamically.. in my table which is in DIV tag.

i tried placing the column names outside div tag..but when column values grows the column names are not exactly at specifc values above.

can any one help,as i spent 5 days on this with no results..

[upl-file uuid=b146182a-88c4-4128-a691-6366d4a38497 size=909B]test.zip[/upl-file]

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@PeOfEoAug 20.2004 — The nature of the table is to stretch with the content. In order to have the top stay above the content and have the content scrolling it has to be brokn up. So if the bottom is stretching with the content then the top is not, so there is really no way to control it exactly. I think you are just going to have to try to ball park it.
Copy linkTweet thisAlerts:
@raghu123authorAug 20.2004 — PeOfEo,

so what do you suggest,for a better option.

you can give me your own way of approach to solve this problem
Copy linkTweet thisAlerts:
@rsdAug 20.2004 — Two things.

First, get rid of the WYSIWYG editor and dive into HTML & CSS yourself. You'll get much better results (not to mention code that wasn't outdated 8 years ago).

With that off my chest, I agree with what PeOfEo said. You'll either have to use fixed width columns or put the headers in a seperate table and use DHTML to control the column widths of the header table to be equal to the column widths of the data table.

Drawback? People HATE to scroll. Especially to the right.

Maybe you could make a 2-row display and place the heading labels in the rows before the fields...

name: Joe Addr: 1234 main

City: Wherever

Then you can alter the background color back and forth from white to a light grey to seperate the records.

Just an idea.
Copy linkTweet thisAlerts:
@PeOfEoAug 21.2004 — You might also stop using a table and just create a div/class system. You are going to have to play with it to get it stretch properly with the content heightwise that is. You can still use a table and have the widths stay fixed if you use overflow:hidden; but this will cause the leakage to be invisible. So you should try to get as much in as possible if you use this.
×

Success!

Help @raghu123 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 5.18,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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