Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > problem with table in div/overflow property

Reply
Thread Tools

problem with table in div/overflow property

 
 
Marcus
Guest
Posts: n/a
 
      06-07-2005
Hello,

I am trying to display a large table of data in a div with scroll bars -
the table represents a daily schedule, and I would like to do this so
that the user can scroll around the table without the width affecting
how the rest of the page is displayed.

I have it "working", except that the table just fills the div's width to
100%, which is not the effect I want. With a lot of data, this causes
each cell to display multiple lines of data and the table becomes
scrunched up.

Instead, I would like the table to just continue in the x and y
directions and display everything on 1 line per cell. I know that if I
specify an absolute pixel width that is large enough for the table, or
if I say something like width="200%", I get the effect I am talking
about, but since the data is generated dynamically there is no way I can
specify in advance how wide the table should be. I would like the table
width to be the minimum width necessary to display everything on 1 line.

Here is my code for the scroll div:

div.view_schedule { overflow: scroll; height: 400px; width: 700px;
border: 1px solid #000000; padding: 10px; }

Thank you all in advance!!
 
Reply With Quote
 
 
 
 
Adrienne
Guest
Posts: n/a
 
      06-08-2005
Gazing into my crystal ball I observed Marcus <(E-Mail Removed)> writing
in news:h3ppe.8542$(E-Mail Removed) m:

> Hello,
>
> I am trying to display a large table of data in a div with scroll bars -
> the table represents a daily schedule, and I would like to do this so
> that the user can scroll around the table without the width affecting
> how the rest of the page is displayed.
>
> Instead, I would like the table to just continue in the x and y
> directions and display everything on 1 line per cell. <snip>
> I would like the table
> width to be the minimum width necessary to display everything on 1 line.
>
> Here is my code for the scroll div:
>
> div.view_schedule { overflow: scroll; height: 400px; width: 700px;
> border: 1px solid #000000; padding: 10px; }
>


div.view_schedule td {white-space:nowrap} will force the content to not
word wrap


--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
 
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
user control inside a repeater - problem passing data table through a property Korel Oktar ASP .Net 0 01-21-2008 06:27 PM
Using 'table values' with non-table elements display-property Jam Pa HTML 3 04-28-2005 07:55 AM
Problem getting HEIGHT property of a dynamic table! Steve Bottoms ASP .Net 2 03-10-2005 10:06 PM
Table/table rows/table data tag question? Rio HTML 4 11-05-2004 08:11 AM
Could not load type VTFixup Table from assembly Invalid token in v-table fix-up table. David Williams ASP .Net 2 08-12-2003 07:55 AM



Advertisments