mercoledì 14 settembre 2011

CENTER IMAGE FROM IMG DIMENSIONS

list($width, $height, $type, $attr) = getimagesize($logo);
echo "<div style='width: 500px; height: 500px;  display:none; position: absolute; background: white; border: solid 1px red;'><center><a href='#'><img src='".$logo."' border='no' style='margin-top: ".((500-$height)/2)."px; width: ".$width."px'></a></center>";

Nessun commento:

Posta un commento