Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
CSS show/hide column in table?
Old 12-01-2008, 06:08 PM CSS show/hide column in table?
Junior Talker

Posts: 2
Name: Mike
Trades: 0
I have a table with 25 rows and 15 columns of numeric data. I'd like to be able to show/hide columns. The default state will be to show about 10 columns, but if the user clicks on something in the header area of one of the columns then i'd like 2 new columns to become visible.

Example:
Col1 Col2 Col3
Row1 data1 data2 data3
Row2 data4 data5 data6

Then the user clicks on Col2 and now new cols are visible between col2 and col3:

Col1 Col2 NewCol Col3
Row1 data1 data2 newdata1 data3
Row2 data4 data5 newdata2 data6

Should I use a Table for this and then change the visibility attribute for all of NewCol's TD elements (one per row)? Or is there a better way?

Thanks!
scanlin is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-01-2008, 07:59 PM Re: CSS show/hide column in table?
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
You can't do this with CSS alone, but need JavaScript to change either the inline styles, or classes containing styles to toggle the columns on and off. Classes will be faster.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Reply     « Reply to CSS show/hide column in table?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.42078 seconds with 12 queries