SyntaxFix
Write A Post
Hire A Developer
Questions
If you don't want to lose the ratio of your image, then don't bother with height:300px; and just use width:100%;.
height:300px;
width:100%;
If the image is too large, then you will have to crop it using an image editor.