hoangthi Posted November 7, 2013 Share Posted November 7, 2013 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 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 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
Archived
This topic is now archived and is closed to further replies.