Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > table column width control question

Reply
Thread Tools

table column width control question

 
 
coolsti
Guest
Posts: n/a
 
      09-05-2005
How do I do this?

I am presenting tabular data via a web interface. The browsers are the
latest IE and Firefox. The number of columns of data is too large to fit
on the page, so horizontal scrolling will be needed.

I want to be able to hide blocks of rows of the table when the user
clicks on certain icons and I can do this using <div> tags and some
javascript. But to do this, it seems I need to have each <div> enclose an
entire table instead of only a collection of rows within a table.

Because of the above, the data I want to show is arranged in several
tables, and these tables are set up as rows in an outer table.

The problem I have is this: I am trying to specify the column widths so
that all the data is aligned in all the tables. But since I have
horizontal scrolling, the browser does not seem to use the pixel widths
that I am giving in <td> tags. So the columns from one table do not line
up with the columns of another.

Does anyone know how I can force the browser to accept the pixel widths in
this case? Alternatively, does anyone know how the data can be placed into
one big table, but so that I can "hide" blocks of rows?

Thanks for any help!

Steve, Denmark


 
Reply With Quote
 
 
 
 
Neredbojias
Guest
Posts: n/a
 
      09-05-2005
With neither quill nor qualm, coolsti quothed:

> Does anyone know how I can force the browser to accept the pixel widths in
> this case? Alternatively, does anyone know how the data can be placed into
> one big table, but so that I can "hide" blocks of rows?


It would seem to me you could id each row and javascript any combination
of them to display:none; However, having never tried this myself, I
could just be talking out of my food hole. Maybe I'll mess around with
it later.

--
Neredbojias
Contrary to popular belief, it is believable.
 
Reply With Quote
 
 
 
 
Travis Newbury
Guest
Posts: n/a
 
      09-05-2005
coolsti wrote:
> I am presenting tabular data via a web interface. The browsers are the
> latest IE and Firefox.


Let me be the first to say... How do you know?

> Does anyone know how I can force the browser to...


Yes, use Flash or Java. If you want the page to look exactly the same
everywhere, use something that does that. You can only suggest a layout
with html, css and scripting. (albeit almost everyone follows the
suggestions)

> Alternatively, does anyone know how the data can be placed into
> one big table, but so that I can "hide" blocks of rows?


Point to what ever rows you want to hide and do this:

MyRowID.style.display="none";


--
-=tn=-
 
Reply With Quote
 
coolsti
Guest
Posts: n/a
 
      09-05-2005
Hi and thanks to the (so far) two replies!

>
> Let me be the first to say... How do you know?
>


Well, its a very very closed audience. It is a database application
developed for my company. The company is small, and access to this
application is only possible from within our intranet. We are therefore
able to dictate which browsers this application will work on. Not to say
that an extension to another browser would not be possible, but we are not
in the position to consider this at the moment, nor do we need to.

I didn't know it was possible to get a table's row to hide itself, as the
two poster's suggest. Thanks! I will try that now!

Regards,
Steve
 
Reply With Quote
 
=?ISO-8859-1?Q?G=E9rard_Talbot?=
Guest
Posts: n/a
 
      09-06-2005
coolsti a écrit :

[snipped]

> I want to be able to hide blocks of rows of the table when the user
> clicks on certain icons and I can do this using <div> tags and some
> javascript.


[snipped]

(...) how the data can be placed into
> one big table, but so that I can "hide" blocks of rows?


It's also possible for block of rows (thead, tfoot, tbody) and also
colgroups. I strongly recommend not to use div, not to use extra tables
or wrapping tables. You need none of that.

Interactive demo page on table column and table row collapse and
visibility in DOM 2 compliant browsers
http://www.gtalbot.org/DHTMLSection/...nCollapse.html

DOM level 1 Dynamic table formatting
http://www.gtalbot.org/DHTMLSection/...ormatting.html

2 important issues:
- avoid border-collapsed table as much as possible because there are
right now too many bugs to consider in current modern browsers
- row (and/or rowgroup) collapsing is easier to code and a bit better
supported by modern browsers than/compared to column and colgroup
collapsing.

Gérard
--
remove blah to email me
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
picture width decides table column width David Basford HTML 3 09-30-2007 10:49 PM
How to set table column width except the last column? Cal Java 1 01-08-2007 06:55 AM
Textbox width scaling to width of data not width of page? AndrewF ASP .Net 1 10-10-2005 04:38 PM
DG Column Width vs Table Column Width Carl Howarth ASP .Net Datagrid Control 1 10-24-2004 08:48 AM
Re: resized image in table extends table width to original image width Sean Jorden HTML 1 08-19-2003 08:59 AM



Advertisments