Get Image height and width in Imagebrowser
-
I’d like to generate a div around an image in the imagebrowser that is the same size as the image being displayed like this:
<div style="height:[image height];width:[image width]> <img src="<?php echo $image->imageURL ?>" alt="<?php echo $image->alttext ?>"height=[image height] width="[image width]" /> </div>
I’ve tried various iterations of stuff like this:
width="<?php echo $thumb_size->width ?>" height="<?php echo $thumb_size->height ?>"
The heights and widths of the images in the gallery vary so I can’t just make it the same. The image itself is already in a container div but the container is the same size on each page. The reason I want to do this is that I want an overlay window when the user hovers over the image. The hover window would be only 80% of the height and width of the image. Thus, I need the dimensions of the image for the container div so the hover window is properly contained.
Thanks!
- The topic ‘Get Image height and width in Imagebrowser’ is closed to new replies.