2 replies [Last post]
gruvn
gruvn's picture
Offline
Regular
Honolulu
Last seen: 16 years 24 weeks ago
Honolulu
Joined: 2004-02-19
Posts: 14
Points: 0

Hey all,

I have an ASP page with a number of tables where the cells are populated directly from a database. The tables are one row each, directly above one another, giving the appearance of a single table full of data. I did it this way so that if a particular row didn't have any data, I can just keep it from showing.

Anyways, each column in each table has a different CSS style applied to it (eg. first column class=style1, secon column class=style2 etc). When the tables are all stacked, each column has the same style as the column in the table directly above it. Since I have defined widths for each style, all of the columns should line up, right? Well they don't always. I think it's because they expand to accomodate the data. Is there a way I can force the text within a column to wrap, rather than have it enlarge a column that I want to remain a defined size?

I'm mostly a newb with CSS - but have done pretty well so far... any help would be great!

gruvn

PS: See it screw up at http://www.kbac-hi.org/kwqid/test.asp?id=6&ahu=11

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 4 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

(Newly Edited!) Table Content column alignment issue

Hi gruvn,
First thing you should look at is how the page renders in other browsers.
In FireFox for example it took me a while to work out most of the content was off the page to the right.

Next you could use a single table and hide the rows when no content was there that way the columns would be the same width on all rows.

Hope that helps

gruvn
gruvn's picture
Offline
Regular
Honolulu
Last seen: 16 years 24 weeks ago
Honolulu
Joined: 2004-02-19
Posts: 14
Points: 0

So simple, yet...

Hey Tony,
Thanks for the input! Yeah, the way I found out is was screwing up was by checking it out on ie for a Mac (looked fine on NN for my PC....). The idea of doing a big table and hiding rows might be the ticket! Now why the heck didn't I think of that?!!!
Muchos gracias!
gruvn