Help - Search - Members - Calendar
Full Version: formatting images in comments
Movable Type Community Forum > Additional Resources > Tips and Tricks
saucemaster
hi
i would like to allow people to display images when they leave comments at my blog. i have an 'img src' tag allowed in my Sanitize Spec settings, so someone can put an image in their comment.

however, i would like for all the images to be resized to fit the window. for instance, someone might display an img that is 500px wide, but i would like for it to be displayed in a size small enough to fit in the window.

is there a place in mt.cfg or something that i can specify that all the images in the comments must have the quality of "width=300".

thanks in advance

www.sisyphean.com
maddy
If the text of you comments is contained in the .comments-body div, you should be able to do it by adding in a definition to your stylesheet, like this:
CODE
.comments-body img {
    width: 300px;
}
I don't know if that works in all browsers though. Works for me in IE6, Mozilla1.4, Netscape7 and Opera 7.20. Definitley not NS4.x, but that's not surprising, is it? smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.