I'm a beginner in learning CSS, and since my technical skills are limited, I'll try to keep things simple. Currently, I have an image taking up half of the screen with the following CSS code that I found after reading some articles:
<div class="div-block-87">
<img src="image.jpg" alt="">
</div>
img {
max-width: 100%;
vertical-align: middle;
display: inline-block;
height: auto;
}
The issue I'm facing is that the image gets cut off like this:
However, when I inspect the image, it appears as expected, see below:
I apologize if my explanation isn't clear, but I'm trying my best to describe the situation.