Not sure about 1.1. This applies to 1.0. Attachment images overflow using stock code. Not to worry, there is a proposed solution. :)
Adding img styling to custom.css makes the image fit the width but image proportions are lost. Huh? Oh yeah, there is a hard coded style tag. In /themes/default/Display.template.php, on line 864 find:
<img src="' . $attachment['href'] . ';image" alt="" style="width:' . $attachment['width'] . 'px; height:' . $attachment['height'] . 'px;"/>';
and replace with:
<img src="' . $attachment['href'] . ';image" alt="" />';
Finally, drop this into custom.css:
img
{
max-width: 95%;
height: auto;
}
Now it all works. At least it's a hack. Perhaps real devs could review this solution? Or create a better one? Thanks for watching! 8)
I feel I reported something similar a while ago... or it was just that attachments were going nuts? Dunno.
Either way... I guess that if it works we can consider for the upcoming 1.0.8. O:-)
@Antechinus provided some updated code for the attachment area a week or two back. I have not had a chance to try it out since I'm traveling. I think the width and height are used by JS to do the 1.0.x expand / collapse of images (if enabled), not sure about that though :/
Yeah they are, but max-width and max-height in the CSS will override the inline width and height, so it'll still only expand to post width.