Philippe Wittenbergh wrote: > On Jan 28, 2009, at 12:16 PM, Jim Albert wrote: > >> I'm trying to create a horizontal scrolling table using the overflow >> property via something like the following code: >> .... [snip code example] > >> This works the way I would like and expect in most browsers except >> Internet Explorer (in my case IE7). I want the area to scroll >> horizontally. In terms of vertical space for the div area, I would >> like >> the browser to use as much height in the browser as needed. Using >> "overflow: auto" I only get a horizontal scroll bar in firefox, opera >> and safari. In IE7, both horizontal and vertical scrolling are >> required >> to see all the content of the div. > > That is the way iExploder works :-); it always wants to generate > scrollbars, and those take up space (that is, they don't adjust the > auto height of an element). > > I have worked around this by giving the element with overflow applied > an extra 16px bottom-padding, but *only* for IE. The 16px is the > height of the horizontal scrollbar. > > Rumours have it that IE 8 is not affected by this bug.
Yes, your padding-bottom suggestion worked out well. For IE, I add the padding-bottom:16px property and in addition since I know vertical scrolling will never be necessary I also set the overflow-y:hidden property which removes the vertical scroll bar that IE otherwise would have shown. Only overflow-x is set to auto. <DIV style="width: 600; padding-bottom:16px; overflow-x: auto; overflow-y:hidden;"> I only do this for IE; for other browsers the following is fine: <DIV style="width: 600; overflow: auto;"> I have another question about the width, but I'll start that as a new post. Jim Albert ______________________________________________________________________ css-discuss [[email protected]] 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/
