I'm trying to have an image auto resize until it fills a div or reaches its initial size. I want it to grow as the div grows but stop when its initial size is reached. I also want it to retain its original aspect ratio the entire time. Is this possible only using css?
Please add some additional detail. If this is as straightforward as you describe, just don't set a width in CSS, and apply a max-width;
img{
max-width:100%
}
and it won't exceed it's natural width. See fiddle - https://jsfiddle.net/6hLz5em2/