{"action":"opened","issue":{"url":"https://api.github.com/repos/akiran/react-slick/issues/1022","repository_url":"https://api.github.com/repos/akiran/react-slick","labels_url":"https://api.github.com/repos/akiran/react-slick/issues/1022/labels{/name}","comments_url":"https://api.github.com/repos/akiran/react-slick/issues/1022/comments","events_url":"https://api.github.com/repos/akiran/react-slick/issues/1022/events","html_url":"https://github.com/akiran/react-slick/issues/1022","id":298473357,"number":1022,"title":"How to center and dynamically scale images to fit slide?","user":{"login":"fractalfrenzy","id":3624969,"avatar_url":"https://avatars2.githubusercontent.com/u/3624969?v=4","gravatar_id":"","url":"https://api.github.com/users/fractalfrenzy","html_url":"https://github.com/fractalfrenzy","followers_url":"https://api.github.com/users/fractalfrenzy/followers","following_url":"https://api.github.com/users/fractalfrenzy/following{/other_user}","gists_url":"https://api.github.com/users/fractalfrenzy/gists{/gist_id}","starred_url":"https://api.github.com/users/fractalfrenzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fractalfrenzy/subscriptions","organizations_url":"https://api.github.com/users/fractalfrenzy/orgs","repos_url":"https://api.github.com/users/fractalfrenzy/repos","events_url":"https://api.github.com/users/fractalfrenzy/events{/privacy}","received_events_url":"https://api.github.com/users/fractalfrenzy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-20T05:09:12Z","updated_at":"2018-02-20T05:09:12Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\nI am trying to have images be centered in the slide and also scale to fit in the available space.\r\nI've tried setting the div containing the img to display: flex and using justify-content: center.  For some reason I also need to have a div outside of that one, and then the centering works.  The problem is: when I scale the window's width to less than the image's width, I want the image to shrink and the slide to shrink with it.  Instead, the height of the slide never goes below the original image height. \r\n\r\nPlease see this [CodeSandBox](https://codesandbox.io/s/42461o75y9) for a demonstration.  Try making the window less wide than the image to see what the problem is.\r\n\r\nHelp is appreciated.\r\n"}}
{"actor":{"display_login":"fractalfrenzy"}}