Why does not max-width?

Why doesn't the following code in IE and how can I solve this?

.block-text-post p img,
.block-text-post img {
width: auto;
max-width: 100%;
height: auto;

<div class="block-text-post">
<a href="#"><img src="img/nf1.png" alt="Picture"></a>

In IE the big image breaks the layout in other browsers everything is OK. Just a property of width: 100% is not suitable because images can be large and small.
June 10th 19 at 14:32
2 answers
June 10th 19 at 14:34
Remove width: auto;
I have not worked. Here , try in IE - rosemarie.Okuneva commented on June 10th 19 at 14:37
June 10th 19 at 14:36
The problem was solved. The problem was that references was the property display: inline-block; you need to specify the maximum width
.block-text-post a {
 display: inline-block;
 max-width: 100%;

Find more questions by tags LayoutCSSHTMLInternet Explorer