Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to define with in percent instead of pixels? #19

Open
fatche opened this issue May 30, 2012 · 5 comments
Open

How to define with in percent instead of pixels? #19

fatche opened this issue May 30, 2012 · 5 comments

Comments

@fatche
Copy link

fatche commented May 30, 2012

Hi there,

First, thanks for the good work.

Then, my question is pretty simple, but i cant find any solution right now.

What i'd like to do is to define the width of the whole thing in percent instead of pixel, so the images i display will perfectly fit the place i put them into.

Any ideas?

Thanks in advance

@Omsalam
Copy link

Omsalam commented May 31, 2012

Hi,

I really want to define width and height in percent but i don't know how to do it

Thanks for your help

@fatche
Copy link
Author

fatche commented May 31, 2012

I may have found part of a solution by giving the width and height dynamically (calculated by the width of the parent container on window load), but I now have a new problem, how could I refresh/update the width and height of the gallery on window resizing?

@georgemichaelis
Copy link

Hi,
can you show us an example of the code? I am interested in percent resizing too.

Regards
George

@patbonf
Copy link

patbonf commented Aug 7, 2012

Hi I use this:

$(function(){
var taillenav= $(window).width();
var tailenav2=taillenav-550;
var taileheight=tailenav2/1.5;
$('#myGallery').galleryView({
.....
panel_width: tailenav2,
panel_height: taileheight,
....

Hope this usefull.

Patbonf

@jeroenpx
Copy link

Hello,

My forked version of GalleryView solves this problem: it implements resizing functionality for the GalleryView.
You can find it at: https://github.com/jeroenpx/GalleryView

See the example "demos/responsive_gallery_demo.html" for more information on how to set it up.

Have fun with it!
Jeroen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants