Jump to content

[SOLVED] scrolling overflow


Renlok

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.