Page 1 of 1

make fancybox title width wider than image?

Posted: Thu Nov 03, 2011 10:19 pm
by deschnell
Is it possible to modify the .js or something somewhere to make the fancybox outer/wrap or the title to be wider than the image?
I've got some images in the CG Products module, and some are either small or tall/skinny.

I tried hunting through the .js for a few different parts of fancybox, (jquery.fancybox-1.3.1.pack.js) and found an area

Code: Select all

d.width=Math.round(o*(d.width-r))
which I attempted to double (o*2*(d.width...) but that doubled the width of the image. I know I'm close, just wondering if there's a cleaner or better way to do this?

(It's not directly controlled by CSS, as the div has the style defined within it's element, and is different for every image).

Re: make fancybox title width wider than image?

Posted: Fri Nov 04, 2011 12:23 am
by calguy1000
This is not an issue related directly to CMSMS or even to the products module... it's related to the javascript library you are using. You should ask there.

Re: make fancybox title width wider than image?

Posted: Fri Nov 04, 2011 2:56 am
by deschnell
I know it's not a core issue, but it is related to the jquery module, which is why I'm asking here. I could go and create a new account on some js forum to ask a single question, but thought there are enough smart and experienced people who know jquery and fancy more than me, so I asked here. If it bugs you Robert, why take the time to answer? How do you know I didn't already ask somewhere else, just trying to get a variety of answers to better learn? Another reason for posting here is for future people looking for the same or similar answer.
Thanks anyway. I love your modules and additions to the project.

Re: make fancybox title width wider than image?

Posted: Fri Nov 04, 2011 10:16 am
by lewishowles
This is much harder if you're working on the minified version. I would suggest downloading a copy of the development version, making changes until it works and then minifying it again yourself.

The writer of this post has made a start but theirs isn't working and I've not really looked over it thoroughly but might give you some pointers. http://groups.google.com/group/fancybox ... a0e62619e4

You'd also have to set it as a minimum width, rather than say doubling the default width, because a normal sized image would then have a box that could go off screen.