I am using ion-scroll to use pinch and zoom on photos. The ion-zoom works beautifully for this purpose. I would like to center the ion-scroll vertically for images to start the pinch and zoom from middle of screen. The image vertically is smaller so I want this to appear symmetric in the view as it shows. Currently it appears this way and zoom only in the size of the image. Is it at all possible?
Finally I got what I wanted. I used simple css like so. The two classes are used with a directive that tell me if the image is portrait or landscape to use one of the two classes to center image.
I had same problem with scroll div added by ion-scroll and took another solution, maybe less !important
It was useful for me, hope for you too:
-> Added “height: inherit;” at “.scroll” definition in file ionic.css
After that I could adapt height from template file setting ion-scroll height attribute
I am really new with ionic, if I’ve mistaken with something please …TELL ME