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 Quote Link to comment 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. Quote Link to comment 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.