Answer the question
In order to leave comments, you need to log in
Why doesn't max-width work?
Why doesn't the following code work in IE and how can I solve it?
.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="Картинка"></a>
</div>
width: 100%
not suitable, since the pictures can be small and large.
Answer the question
In order to leave comments, you need to log in
Solved the problem. The problem was that there was a property for the links display: inline-block;
and they had to set the maximum width
.block-text-post a {
display: inline-block;
max-width: 100%;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question