hobbes Posted October 2, 2008 Posted October 2, 2008 How do you set the max width size in the bbcode engine so that your forum, mailbox and other bbcode layouts aren't affected by large images? Quote
Floydian Posted October 2, 2008 Posted October 2, 2008 Re: BBCode Resize http://criminalexistence.com/ceforums/i ... ic=23871.0 That post demonstrates how to scale down an image to a predefined max size. You would get a x/y list of numbers that you can plug into the img tag as width="y" height="x". If you just toss in width and height attributes that are the same on all images, then all images will be that size. This code above only scales down images larger than that max size, keeps proportions, and doesn't increase the size of smaller images. Quote
hobbes Posted October 2, 2008 Author Posted October 2, 2008 Re: BBCode Resize The thing is, I don't see the use of <img> properties anywhere in my bbcode engine in which that post would apply to me. :? Quote
Floydian Posted October 2, 2008 Posted October 2, 2008 Re: BBCode Resize You'd have to hack into the bbcode engine, and after the part where the bbcode engine isolates the contents of tags, you would feed that data into the script I linked to. It would require some modification of both the bbcode engine and the script I linked to, but that script has a good solid foundation to build on. Quote
POG1 Posted October 2, 2008 Posted October 2, 2008 Re: BBCode Resize in the container you could add style="width:XXpx; overflow:hide;" | change the XX to the width u want i dunno if it will work or distort. Quote
Floydian Posted October 2, 2008 Posted October 2, 2008 Re: BBCode Resize browsers always make the image in the img tag fill the available space. adding width to that will cause the image to resize. if you wrap the img tag in a div, and apply the width and overflow to the div, then the image in the img tag will be contrained like you're talking about. ;) of course the portion of the image that doesn't fit the space is simply hidden from view. "overflow: auto" would add scroll bars Quote
POG1 Posted October 2, 2008 Posted October 2, 2008 Re: BBCode Resize yeah overflow auto, but i don't like 2 scroll bars showing, I'm not sure if auto shows both but you can hide the Y scroll bar overflow-y:hide; oxerflow-x:auto; something like that Quote
Floydian Posted October 2, 2008 Posted October 2, 2008 Re: BBCode Resize it might be browser specific. firefox only shows the scroll bar that would be usable. other browsers, I couldn't tell ya nice tip on the overflow-y/-x lol, never seen that one before Quote
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.