Posted by ironcorona on 05/15/06 21:46
Martin Jay wrote:
> In message <2g2ag.23$EA.22@fe03.lga>, robert
> <ab@no.spam-alama-ding-dong> writes
>> | Try inserting the following where you want the picture to be display:
>> |
>> |
>> | <?php
>> | $image = ; // image location and filename
>> | $name = ; // name of person
>> |
>> | $size=getimagesize($image); // set the dimensions of image
>> | ?>
>> |
>> | <img src="<?php echo $image; ?>" alt="<?php echo $name;?>" <?php echo
>> | $size[3]; ?>">
>
>> oh martin! again with the helpful advice. by default, MOST browsers
>> display
>> an image with it's normal size...so your "advice" is STILL less than
>> useful.
>> one typically specifies size when one wants to control the size either
>> larger/smaller than the original.
>
> I've cross-posted this to alt.html.
>
> My advice would be the opposite of yours: include image width and height
> in the img element, and don't use them to change the size of an image.
The spec agrees.
http://www.w3.org/TR/REC-html40/struct/objects.html#visual
"The height and width attributes give user agents an idea of the size of
an image or object so that they may reserve space for it and continue
rendering the document while waiting for the image data."
--
Brian O'Connor (ironcorona)
Navigation:
[Reply to this message]
|