I have div in which is input which a don't want to be hidden when user scroll upper. And in that div is second div in wich are chat messages. But on first div is max-height
in percentual value and it's bugged. When I put there value in pixels it works but percentual values not. Can it get fixed?
Asked
Active
Viewed 797 times
-2

WebCoder
- 62
- 10
-
maybe show us your code? – Frosty Oct 28 '18 at 10:39
-
This is chat without messages https://ctrlv.sk/0xAm. Max-height is not needed there. And this is chat with more messages https://ctrlv.sk/QXgc. And there max-height is needed but not works. Sorry that I don't put the code but it is so long code. – WebCoder Oct 28 '18 at 10:43
-
@Innervisions read message upper. – WebCoder Oct 28 '18 at 10:44
-
I assume you are talking about the chat in the middle where people exchange messages and you want to be able to scroll up and down? – Frosty Oct 28 '18 at 10:47
-
@Innervisions sure. – WebCoder Oct 28 '18 at 10:48
1 Answers
2
Showing us your code would be easier but I guess the chat container doesn't have its height set. Percentual max-height
defines the maximum height in percent of the containing block so if there's no explicit height set on your container max-height
won't work. To resolve this either set a height
on the chat container or use viewports units instead of % (e.g.: max-height: 50vh
means 50% of the viewport height)

The24thDS
- 164
- 8