Is there a way of dynamically setting the height of an ion-slide
inside an ion-slide-box
? When my ion-slide
elements have a lot of content in them they overflow the screen and the user has to scroll down to see the pager. I’m looking to resize the height based on percentages, so the slide box will always take up, say, 80% of the screen. Thanks!
Create me a working example of this problem and I will fix it for you.
If you don’t have a template find it here.
I’m currently testing the slide box on all the iPhone screen layouts. Here is my code for the scroll box:
I’m looking to dynamically resize the height based on percentages, so the slide box will always take up, say, 80% of the screen (just edited the question to clarify this). Thanks!
Something like this: http://codepen.io/anon/pen/xGoLMM
Hm, it doesn’t seem to be working on the iPhone simulator when the content overflows. It works fine on the Codepen, though…
Unfortunately, I can’t help you with that. My Mac is in closet and it’s not going out of there
iOS implementation is probably using some other class names. Advice, try accessing list DOM content and output it into command line so you can view it easily. Then compare them with class names used in desktop example.
Will do, thanks for the help.
Okay, so after some debugging I found that the slide box won’t resize dynamically if it’s placed in ion-content
. Any ideas as to why this is an issue? I tried to set the ion-content
height to 100% to no avail.
ion-content is not a problem, it’s a scroll class inside: http://codepen.io/anon/pen/yNdzZr
Right, I tried that earlier but look at what happens when you get to the bottom of the list.
What about this one: http://codepen.io/anon/pen/gpNXrK
That works better but partially obscures the bar at the bottom (the last ion-item
). Also, the pager overlaps the card itself which shouldn’t happen.
Then play with it until you find a right combination. I bet you can do this now when you know how it’s done.
Okay, thanks. I actually ended up just vertically centering the cards and calculating their heights via Angular.