Trim images/layers and position them in HTML+CSS automatically