1

Android - Strange Behavior html style max-width

view story
linux-howto

http://stackoverflow.com – I want to show some html in a WebView. In that html code there is an image tag "img src" and a style within: style="max-width:300px;max-height:300px;". My Smartphone's display width is 480px. When I set the max-width style to 480px, the image don't fit to the display and is not complete visible. Arround the WebView, there is no Margin or Padding. But when i set the max-width to 300px, the image fit perfect. What is the reason of that ? My display has a width of 480px und the image with that style 300px. webView.loadData(newContent, "text/html", "UTF-8"); Html Code (newContent): <!DOCTYP (HowTos)