css – Big size image is not rendering properly in WKWebView for iOS


It’s getting cut from the right side.

<Style>
img {
      padding-top:20px;
      padding-bottom:20px;
      margin:-50px 0 0 -50px;
      display:block;
      height:auto;
      width:auto;
      max-width:100%;
    }
</Style>

For solving this issue I’ve added the above CSS code for aligning the particular image which has bigger size =[example1:width:1366px, height:650px],[example2:height:2400, width:800], but it’s having a problem for other images which are smaller in size. I’m getting padding issue for those small images.

Please look into above code. I want generic code for CSS which will fit for all sizes of images.

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img