[I have this codepen](http://codepen.io/anon/pen/zjvLg) where I try to downsize an image, depending on the surrounding width. The problem is that it downsizes without constraining proportions. 

HTML

```
the inline width and height come from wordpress and can luckily be successfully get overwritten by the class definition.
<br/>
<img src="http://artfiles.alphacoders.com/613/61309.jpg" width="4443" height="5555" class="someclass"/>

```

CSS

```
.someclass{
  width: 50%;
  height: 50%;
  position: absolute;

}

body {
    background-color: cyan;
}

```

Is there a neat way to do this in CSS, and if not, what is the cleanest way to do it with jquery?