Shadows2k Posted December 25, 2006 Share Posted December 25, 2006 Hi,I have a question, ages ago I remember using phpBB and it had something that enabled the layout to stay intact when a user used [img tags to show a image, one that is much larger then the design and the layout didnt break.I am trying to track this down because I have a forum system I made and I dont want users breaking the layout using the [img tag. Quote Link to comment https://forums.phpfreaks.com/topic/31806-avoid-image-breaking-layout/ Share on other sites More sharing options...
fenway Posted December 26, 2006 Share Posted December 26, 2006 I have no idea about phpBB, but if you hard-code image widths & heights, the layout shouldn't change either. Quote Link to comment https://forums.phpfreaks.com/topic/31806-avoid-image-breaking-layout/#findComment-147779 Share on other sites More sharing options...
ToonMariner Posted December 26, 2006 Share Posted December 26, 2006 you coudl always check the size of the dimensions of file the file before displaying - if it is larger than a spcified value then use teh gd functions to create a new smaller image resampled from the orginal. Quote Link to comment https://forums.phpfreaks.com/topic/31806-avoid-image-breaking-layout/#findComment-147943 Share on other sites More sharing options...
wildteen88 Posted December 26, 2006 Share Posted December 26, 2006 another way is to wrap it in a div and then give it an overlfow of auto, that way if the image is larger than its container then scroll bars will appear around the image (a bit like an iframe). Quote Link to comment https://forums.phpfreaks.com/topic/31806-avoid-image-breaking-layout/#findComment-148009 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.