JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<img class="img" src="http://www.bastards-design.de/wordpress/assets/aa_2.jpg"/>
</div>
CSS
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html,
body {
height:100%;
width:100%;
padding:10px;
}
.container {
background: green;
float: left;
height: 100%;
max-width: auto;
width: auto;
}
.img {
width: auto;
height:50%;
}