Andre
Andre

Reputation: 849

Picture not displaying correct on iPad

I am still having issues trying to display photos on the iPad, I found a way to do it but I don't understand the reasons I can't have it inside of a image tag instead of a background in a div tag. The image native position is in landscape and I need to display any picture in portrait, thats the problem, the iPad seems not to understand that and squishes the picture.

Is there a way to do it without having the photo as a background in a div? Here is a sample code to illustrate the issue.

<html>
<head>
<title>test</title>
</head>
<body>

<table border="1">
  <tr><td align="center">Test Photo Display on iPad</td></tr>
  <tr>
  <td> <!-- Thats how I need to display the photo, but it gets squished-->
    <img style="width:288px; height:384px;" src="photo.jpg">
</td>
 </tr>
 <tr>
  <td> <!-- Here the picture gets displayed just fine since I am using it as a background -->
      <div style="width:288px; height:384px;background: url('photo.jpg')no-repeat center;">
      </div>
  </td>
  </tr>
</table>

</body>
</html>

Upvotes: 0

Views: 60

Answers (1)

user3443238
user3443238

Reputation:

I would first try to take out the style part and simply do:

<img width=288px height=384px src="photo.jpg">

if that doesn't do it, then I have a feeling there is more code that I am not seeing in your question that effects the table

Upvotes: 1

Related Questions