hoangthi Posted November 7, 2013 Share Posted November 7, 2013 (edited) This is my style tag: div.scroll { width:405px; height:550px; } If the content is > 550px, the div area will show a Scroll. So, I want this, If the content is < 550px, ex: 200 px, the div height will be automatically decrease down to 200 px. Thanks Edited November 7, 2013 by hoangthi Quote Link to comment https://forums.phpfreaks.com/topic/283680-auto-decrease-the-div-height/ Share on other sites More sharing options...
PravinS Posted November 7, 2013 Share Posted November 7, 2013 try using this div.scroll { width:405px; max-height:550px; overflow-y:auto; overflow-x:hidden; } it will work as, its maximum height is 550 and after that vertical scroll bar will come Quote Link to comment https://forums.phpfreaks.com/topic/283680-auto-decrease-the-div-height/#findComment-1457333 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.