I have resizable DIV with text. I operate only on width, the height should auto size but not smaller than text (content). How to do it?
My code:
HTML:
<div id="block">
sadfasda asfasfasf asfafafaf a a a fasfas fasfafasfaf
asffasdf as fasfasfa sfasfafasfaf akflj jalj faldjfajf'a
klasdjf lka;sjfajf ljasfljaflkj f jf f jfaj flajklfjalfj
klasjf f lkajfajf lajf lajf al alfjasl jall fafasff
</div>
CSS:
#block {border: 1px solid red; width: 300px; height: auto; padding: 5px}
JS:
$("#block").resizable({
maxWidth: 500,
minWidth: 115
});
Here the DEMO