You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The app code below displays a column of buttons, then an image to the right. The image has an aspect ratio of 2:1 and it resizes to the available width of the window.
I can resize the window to any size, which means that sometimes the image will be clipped at the bottom, and sometimes there will be empty space below the image.
How do I constrain the window resizing so that it always fits the content? It appears to be related to enabling/disable scrolling in the window but I cannot see how to achieve this. I can find no examples which illustrate how this is done. Pointers?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The app code below displays a column of buttons, then an image to the right. The image has an aspect ratio of 2:1 and it resizes to the available width of the window.
I can resize the window to any size, which means that sometimes the image will be clipped at the bottom, and sometimes there will be empty space below the image.
How do I constrain the window resizing so that it always fits the content? It appears to be related to enabling/disable scrolling in the window but I cannot see how to achieve this. I can find no examples which illustrate how this is done. Pointers?
Beta Was this translation helpful? Give feedback.
All reactions