Solution for portrait photos
-
Hi everyone!
As many people using this theme I encountered problems with portrait photos. After a few ideas I managed to create a short CSS code:#slider img { /* turn off paralax */ /* position:fixed !important; position:absolute; top:0; right:0; bottom:0; left:0; */ /* sizing ang align for portrait */ max-height: 110% !important; max-width: 100% !important; height: auto !important; width:auto !important; margin-top: 0px !important; margin:auto !important; }
First part (“turn off paralax”) isn’t necessary, I added if you would like to turn off the paralax effect. In this code it isn’t used. If you want to apply this code you should remove comment marks over and below the code.
The second part is more important, it allows to show non-stretched portrait photos.
I know that the photos aren’t full-screen now, you can fix it by changingmax-height
parameter. I set it for 110% because I don’t want to have tops and bottoms of my photos cut off.
I know that so many!important
marks aren’t a good thing. However… This is the only way I found without fighting with js.My page is still under construction, but you can see how this works on:
portfolio.ts-photo.pl
- The topic ‘Solution for portrait photos’ is closed to new replies.