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

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -