Forum How do I...?

Tiny images

I am having a problem where images are being shrunk cause of the outer container has a specified width. In this case we have users who use a wysiwyg editor to create their own reports. And the editor makes some td cells have a width of 5px ... normal browsers see that there is an image with a given height and width and the table grows accordingly ... while prince seems to not do that. Is there any setting that I can turn on to make the images show correctly in prince? I am and can continue to fix reports for users, but it is getting redundant and out of control. You can see how it looks in my attachment

  1. tinyimages.png131.8 kB
Apply this CSS rule:
img { max-width: none }

Currently we set the max-width for images to 100% of the container element to stop big images going off the page, but it looks like this causes unexpected behaviour in some cases so we may change it. You can delete the offending rule from the default HTML style sheets (lib/prince/style/xhtml.css and xhtml-ns.css) if you like.
That worked perfectly.

We have removed this img max-width rule from the default style sheets in Prince 8.0.