MyBB Community Forums

Full Version: css help with image resizing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi folks,

I'm trying to downsize my plugin list and as such, get rid of the resizing plugin and just use css.

right now the following code is being used and works in chrome, but not firefox:

.post_body img {

max-width:100%;
height: auto;

}

any tips for making it work correctly with firefox?
use width instead of max-width....

.post_body img {
    width:100%;
}
(2014-07-20, 06:33 AM)mmadhankumar Wrote: [ -> ]use width instead of max-width....

.post_body img {
    width:100%;
}

using width stretches every image to 100% and distorts some.
I believe this should work how you'd like:

.post_body img {
    width: auto;
    max-width: 100%;
}
(2014-07-20, 08:05 PM)Eric J. Wrote: [ -> ]I believe this should work how you'd like:

.post_body img {
    width: auto;
    max-width: 100%;
}

still no dice.

works fine in chrome, not in firefox 30.0

leefish helped me out with this.

the fix was to add this to the postbit template:

style="table-layout: fixed;

so the entire line looks like:

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="table-layout: fixed;