Jump to content

Mac Safari Image Width, Height %


sqlnoob

Recommended Posts

Hi I have a problem with image width and height. Apparently the images are the correct size on a windows computer, with the internet explorer, firefox, chrome or safari browser.

 

But the height is wrong on a mac computer using the safari browser.

 

The uploaded images on the server can be of any size. The visitors screen resolution varies, so that's why I set the width in percentages, because I don't want the picture being wider than 50% of the page. I see that picture is distorted in safari using a mac computer. The width is correct, but the height is wrong. The safari browser doesn't want to get the height in percentages for some reason.

 

How do I solve this?

 

CSS CODE:

 

IMG.zooma {width: 50%; height: 50%;}
DIV.edger {padding: 10px; border-style: solid; border-width: 1px; border-color: #000000;}

 

PHP CODE:

 

<DIV class='edger'>
<P>
<A HREF='fotoview.php?photo=".$photoid."&zoom=full'>".$photonom."</A>
</P>
<A HREF='fotoview.php?photo=".$photoid."&zoom=full'>
<IMG src='pictures/".$photofile."' border='0' class='zooma'>
</A>
</DIV>

Link to comment
https://forums.phpfreaks.com/topic/269479-mac-safari-image-width-height/
Share on other sites

  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.