poleposters Posted September 17, 2008 Share Posted September 17, 2008 Hi, I've got a div that contains text retrieved from a database. I want to ensure that the text deosn't overflowfrom the div even if this means that some of the text can'tbe read. Is there a way to this? The div has width and height.I wouldof thought that would be enough. thanks Link to comment https://forums.phpfreaks.com/topic/124580-how-do-i-stop-text-from-overflowing-out-of-its-div/ Share on other sites More sharing options...
F1Fan Posted September 17, 2008 Share Posted September 17, 2008 Use the CSS "overflow" property: Example div{ overflow: scroll; } Possible Values visible - Default. The content is not clipped. It renders outside the element hidden - The content is clipped, but the browser does not display a scroll-bar to see the rest of the content scroll - The content is clipped, but the browser displays a scroll-bar to see the rest of the content auto - If the content is clipped, the browser should display a scroll-bar to see the rest of the content Link to comment https://forums.phpfreaks.com/topic/124580-how-do-i-stop-text-from-overflowing-out-of-its-div/#findComment-643466 Share on other sites More sharing options...
poleposters Posted September 17, 2008 Author Share Posted September 17, 2008 Great! Thanks very much. That a better solution than I'd hoped. Link to comment https://forums.phpfreaks.com/topic/124580-how-do-i-stop-text-from-overflowing-out-of-its-div/#findComment-643468 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.