Philippe Wittenbergh wrote:
> On Jan 29, 2009, at 7:10 AM, Jim Albert wrote:
> 
>> It seems like the only way I can get table to be "clipped" properly  
>> and
>> scroll is to give a pixel length to the width of the DIV.
>>
>> I thought I could use:
>> <DIV style="width: 100%; overflow: auto;">
>> and I was expecting that the table would fill the width of the browser
>> and then scroll horizontally when necessary. But what happens is the
>> table expands out to the size needed to display all the images in the
>> row of the table and in most cases causing the entire browser to  
>> gain a
>> horizontal scroll bar.
> 
> That is what should happen, and happens in a couple of browsers I  
> happen to have open.
> Do you have a URL of a page showing the issue (in which browser) ? It  
> is _always_ more easy to discuss things with sample code.

I believe my problem is related to me placing the scrolling table within 
a table cell. I think I understand what some browsers are doing and 
perhaps there is a CSS solution that can be offered.

Here are some simple examples:
http://www6.netrition.com/scroll_table_by_itself.html
This is a simple scrolling table that uses 100% width of the browser 
window and adjusts itself according to the size of the browser window. 
No problem; works fine in all browsers I've tried... Firefox, IE, 
Safari, Opera.

http://www6.netrition.com/scroll_table_within_table.html
Here I've placed that same scrolling table within a cell of an outer 
table. Notice that no scrolling appears. This behavior occurs in 
Firefox, IE and Safari. Only in Opera do I see the rendering that I 
would like. Opera sees that that middle cell of images is within a 
scrolling area and does not render the table with enough room for all 
the images.

What I think is happening is that Firefox, IE and Safari are first 
determining table size based on the contents and determines it needs a 
lot of width to display all those images. It then assigns 100% of that 
very wide 2nd cell which is the table of images for scrolling. But since 
enough space was rendered to display all the images, no scrolling is 
necessary.

I tried assigning widths to the 1st and 3rd outer cells. However, that 
has no affect, the table is still rendered large enough to display all 
the images at once. I don't want to assign widths, anyway.

I like the rendering that Opera does. Is there some CSS I can apply that 
indicates to the browser not to render as much space as is necessary to 
display all the images within the 2nd cell? In other words... render the 
table and make use of the scrolling so that all three cells of the outer 
table are visible in the browser.

Thank you.

-- 
Jim Albert

______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to