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

Max height #15

Open
chlebta opened this issue Aug 31, 2015 · 3 comments
Open

Max height #15

chlebta opened this issue Aug 31, 2015 · 3 comments

Comments

@chlebta
Copy link

chlebta commented Aug 31, 2015

Hello, Thank's for this nice and simple library.
I need to know how can I set max height like the max-width property ?
Also is it possible to fix height and width of library ?

@kthornbloom
Copy link
Owner

I need to know how can I set max height like the max-width property?
This plugin automatically sets the height based on the image you're viewing. It's not currently set up with a max-height option since most responsive elements can just use whatever height they need as long as the width fits the page.

Also is it possible to fix height and width of library?
Are you asking if you can set a width and height for the thumbnail images? Look at lines 45 - 52 in smoothproducts.css to change these values.

@chlebta
Copy link
Author

chlebta commented Sep 1, 2015

I mean fix height and width for the library not for thumbnails, Like in sales sites it has always same size and width

@andynoelker
Copy link
Contributor

I believe you want the viewer itself to always have a fixed height, instead of automatically adjusting based on the image size currently being viewed?

The easiest (albeit a bit hackish) way to do that is to either modify smoothproducts.css or write your own css script that overwrites the sp-large class.

For instance, in smoothproducts.css on line 77 add a height to sp-large:

.sp-large {
    position: relative;
    overflow: hidden;
    top: 0;
    left: 0;
    height: 500px !important;
}

This will make the main image space exactly 500 px tall. By default, all images that are too tall will be cut off, but if you wanted to change how the overflow worked, just adjust that overflow property and make it important (ex: overflow: scroll !important).

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

3 participants