Home › Forums › CSS › [Solved] Containing div to fit the inside content or viewport › Reply To: [Solved] Containing div to fit the inside content or viewport
If anyone is still willing I have made a reduced test case on codepen.
Test 1 gets a scroll(good) when the content is bigger then the viewport
but the wrapper is 100% of the viewport when the content is smaller(bad, no clickability under that div and the button must stay under that div regarding z-index)
Test 2 is vice versa.
I need a mix of those examples – for the wrapper to get a scroll if the viewport is smaller and fit the inside content if viewport is bigger.
Am I stupid or what – it seem to be a simple task