Creating forums - resizing an image's HTML via HTML/PHP? -


this may hard describe...but...

i created simple php forums , have ability users post image links , want image appear on page. but...my forum posts inside iframe , if width of post wide cut off side want images wide. concepts getting image fit? wonder if there's auto resizing option in html or way php file width/height remotely , generate html it?

you can use max-width attribute in css eg:

iframe img{max-width: 500px;}/*or whatever max wants be*/ 

and in php can use

<?php     list($width, $height) = getimagesize($yourfilename); 

you might need wrap getimagesize in if because cause return false on failure


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -