0

I have the following bit of HTML that I send - as part of a larger html document - to a UIWebView:

<img src="imagename.png" style="height: 20%; width: 20%;">

Sometimes, the image appears properly scaled. Sometimes, it appears scaled only in one direction, with the other being 100%. Sometimes, it appears with the image at original size in both directions. I cannot understand why the results are inconsistent. Perhaps I am scaling improperly?

Thanks

Chris
  • 1,013
  • 1
  • 15
  • 35

1 Answers1

0

Stupid question. I found the answer here on this site.

To correct, I did this:

<img src="image.png" style="height: 20%; width: auto;">
Community
  • 1
  • 1
Chris
  • 1,013
  • 1
  • 15
  • 35