View Full Version : forum img

02-17-2010, 10:42 PM
user can do in forum:

http ....jpg

before save I convert that to ..., and add static size limit, so it does not go out of my box, if jpg bigger:

<img src="http..jpg" style = "width...; height">

This proves to be bad if .jpg is smaller than my size limit, it stretchs it to max.

I mean I know there is css max-width, but as I know it does not work on all browsers.

Do I have to download each and every .jpg first to measure it or is there something else more simpler ?

02-17-2010, 10:52 PM
hmm, mybe this:

width: expression(this.width > 400 ? 400: true);

02-17-2010, 10:57 PM
tested it and it works, unfortunately it is not css validator compatible.