Expanding fbcycler div height

Page: 1

Author Post
Member
Registered: Dec 2009
Posts: 39
Hi again - a simple question (not related to jQuery Mobile this time)!

Using the thumbnail cycler, am I allowed to add a border, or padding, property to the fbcycler div?

The reason I ask is because when I do, the height of the div seems to increase progressively on each thumbnail transition. The amount of each increment directly relates to the specified thickness of the border, or the height of the padding-bottom value.

You can see what I mean here, where I use your demo with a 1px border:-

http://tinyurl.com/qa6crtb

I can, of course, implement a workaround, but thought you might be interested if this not the intended behaviour ;)
Administrator
Registered: Aug 2008
Posts: 3382
A semi-bug in the pre-version 7 releases that has been corrected in the mythical, futuristic v7 release. It stems from stupid javascript including border width when reporting offsetHeight, but not including it when setting the height style.

It's easily avoided by putting the borders where you really want them: on the images (and removing the div border).
<style>
.fbCycler img { border:1px solid red; }
</style>


In general, styling the fbCycler div itself is somewhat of a trial and error process. The floatbox code works the styles on those divs pretty heavily, and it's easy for the markup to get into an argument over who is doing what. Styling the images where appropriate is one way to avoid the fight. Another is to put the fbCycler div inside another div and style that wrapper.
Member
Registered: Dec 2009
Posts: 39
Thanks for the explanation - I'll go with the wrapper solution until the eagerly awaited "mythical, futuristic v7 release" materialises :D

Page: 1