Check out example codes for "html image goes outside div". It will help you in understanding the concepts better.

Code Example 1

<!-- An image will go outside its parent div if the div 
has no set height and no overflow -->

<div style="height: 100px; overflow: hidden;">
	<img src=#>
</div>

Learn ReactJs, React Native from akashmittal.com