Scroll bar appearing after upgrading to version 6.

Page: 1

Author Post
Member
Registered: Nov 2010
Posts: 71
After I upgraded from version 5 to version 6 (6.0.3) some of my Floatbox windows have a vertical scroll bar on the side when they did not with the previous version. As an example, navigate to http://www.bmwmcon.org/officers.php and click on Name Polly Wright. There will be a scroll bar. If you click on name Eugenio Cilento a scroll bar will not appear even though there is more data in that window. I have noticed this on more than one domain where I use Floatbox. Any help will be appreciated.

Additional information - The above results were with Firefox. All windows have a scroll bar using Chrome even if very little data is in the window.
« Last edit by SteveS on Fri Feb 14, 2014 1:23 am. »
Administrator
Registered: Aug 2008
Posts: 3382
Eugenio gets a scrollbar in Chrome too, but not in Firefox.

The easiest way to make sure you don't get scrollbars is to set contentScroll:false. On your page, this can be done by adding it to the options already set on the containing div that wraps the table.

The reason why relying on Floatbox's measuring of this particular content to give consistent results is because of the float:left; style assigned to div.contactajax. Floating HTML can be difficult to measure accurately and consistently because it's, well..., floating. Removing that style will have no effect on the layout other than to permit proper measurement.
Member
Registered: Nov 2010
Posts: 71
Thank you very much. I have no idea why I had the float left there to begin with. I also have css "div.contactajax img" with a float left. Most likely I placed the float in the wrong place and when I corrected it I forgot to remove it from "div.contactajax". Fixing the CSS removed the scroll bars from all except Dave Bonner and Mark King. I still need to research that.

I couldn't use contentScroll:false because when I did, not all of the data was displayed on the people with long content when the browser screen was small.
Administrator
Registered: Aug 2008
Posts: 3382
So, float:left was either the wrong answer or not the full answer.

I think it's a little bit arbitrary which ones get scrollbars. I suspect that it has to do with where the line breaks occur. If adding a vertical scrollbar, and thereby decreasing the available width by about 17px, causes a new line break to occur, the content height increases by one line height. So now the height is bigger than the container and that vertical scrollbar is required. This is actually the browser operating with scrolling set to auto on the container. It's auto-inserting the scrollbar because when it does, the scrollbar is needed. :shock:

That's my theory anyway.

You can quickly solve your dilemma by setting autoFit:false as well. This will let the floatbox be taller than the browser and people can use the browser scrollbars to see all of the tall content.
« Last edit by admin on Fri Feb 14, 2014 6:46 am. »

Page: 1