MyBB Community Forums

Full Version: Image width limitation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Okay, since the forum updates, any images posted have stopped being reduced in size. My solution was a max-width limitation in pixels on a certain class, but the class must have either been changed, or it was one I created myself in a template (I forgot where).

I don't like using plugins for this, as I have never found one to work properly. Firstly, can I limit image width with percentage? I have NEVER been able to get that to work. If so, how? If not, what do I have to mess around with to get images small enough, so that the posts dont get stretched?
.post_body img {max-width: 600px !important} should work in global.css
I'm afraid that didn't work.
Although you do not want to use any plugins I can assure you that this plugin works very good.
http://mods.mybb.com/view/fit-on-page

It resizes the picture to your maximum width that is available in the post.
Also it pop-ups when you click on it.
This resizes to browser's width:
<!DOCTYPE html>
<head><meta charset="UTF-8"><title>Test image sizing</title>
<h1>Some Heading</h1>
<img style="max-width:100%;height:auto;" alt="" src="http://mybboard.net/assets/images/header.jpg">
<p>My first paragraph.
</html>
(2013-04-26, 04:46 PM)hiig Wrote: [ -> ]I'm afraid that didn't work.

This actually did work. I just forgot to clear the cache upon refresh.