css - How to show scroll after certain height but height should not be fixed? -


i have div following style: height:250px;scroll:auto;. want scroll after 250 px should have height according content in it.

for example, if content in 100px, then, height of div should 100 without scroll. but, if height exceeds 250px, should show scroll.

how can it?

is after?

demo

css:

.dyn-height {     width:100px;     max-height:250px;     overflow-y:scroll; }

height: optional - demo.


Comments

Popular posts from this blog

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -