...

View Full Version : forum img



BubikolRamios
02-17-2010, 09: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 ?

BubikolRamios
02-17-2010, 09:52 PM
hmm, mybe this:



.user_img
{
max-width:400px;
width: expression(this.width > 400 ? 400: true);
}

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum