Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As this is for the web, I would strongly suggest not trying to incorporate the PNG with the original at the time of upload. Your best bet is to do any sizing of the image etc. at upload, then where the image is used throughout your site/application, you float an absolutely positioned PNG over the top. The PNG will have it's 4 corners curved as you see fit and the drop shadow applied as you wish.</p> <p>If the image is of an underterminate size when you are displaying it, you can do a "portal" or "cut-out", by using <code>overflow:hidden;</code>.</p> <p>To demonstrate;</p> <p>You image is 500 x 500. You want an icon of 100 x 100. If you re-size by HTML it'll look a mess, so place down div, add <code>background-image</code> of your 500 x 500 image and <code>overflow:hidden;</code> with <code>width:100px;height:100px;</code>. Then create another div, apply <code>position:absolute;left:0;top:0;z-index:2;width:100px;height:100px;</code>, within this place your transparent PNG. </p> <p>Then on your page;</p> <pre><code>&lt;div style="background-image:url('/images/thumbnail.jpg');width:100px;height:100px;overflow:hidden;z-index:1;"&gt; &lt;div style="position:absolute;left:0;top:0;z-index:2;width:100px;height:100px;"&gt; &lt;a href="/ifclickable.htm"&gt;&lt;img src="/images/transparent.png" alt="alt for img here" /&gt;&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>This will then mean your icon cannot be broken and all you have to worry about is the re-size on your upload.</p> <p>Hope that helps.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload