Wednesday, October 30, 2013

Scaling div size with background image whilst keeping aspect ratio

The easiest way is to use below style for the div



<div class="divImage" style='<%# "background: url(\"" + DataBinder.Eval(Container.DataItem, "divImage") + "\") no-repeat center center; background-size: cover;" %>'></div>


A more detailed approach is listed in this post

No comments:

SSL Error - The connection for this site is not secure

 After cloning a git repo of dot net framework website and trying to run it all I could see was this error Turns out the fix was to simply e...