Renlok Posted August 15, 2009 Share Posted August 15, 2009 i have a div which is <div style="overflow:scroll; width:400px; margin:20px;"> ...content </div> and the content is generated by php so the amount of conent changes. i was wondering if its possible so if the content does overflow it has the scroll bars and if it doesn't then the divs height automatic so it fits around the content or if this isnt possible whats the best alternative Link to comment https://forums.phpfreaks.com/topic/170398-solved-scrolling-overflow/ Share on other sites More sharing options...
TheFilmGod Posted August 15, 2009 Share Posted August 15, 2009 i have a div which is <div style="overflow:scroll; width:400px; margin:20px;"> ...content </div> and the content is generated by php so the amount of conent changes. i was wondering if its possible so if the content does overflow it has the scroll bars and if it doesn't then the divs height automatic so it fits around the content or if this isnt possible whats the best alternative min-height/max-height is probably what you're looking for. Link to comment https://forums.phpfreaks.com/topic/170398-solved-scrolling-overflow/#findComment-898918 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.