sqlnoob Posted October 15, 2012 Share Posted October 15, 2012 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> Quote Link to comment https://forums.phpfreaks.com/topic/269479-mac-safari-image-width-height/ Share on other sites More sharing options...
sqlnoob Posted November 10, 2012 Author Share Posted November 10, 2012 it was {width: 50%; height: auto;} Quote Link to comment https://forums.phpfreaks.com/topic/269479-mac-safari-image-width-height/#findComment-1391575 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.