I have a "message" element which should be resized if text doesn't fit its width with some limits(just like in messengers).
.message {
position: relative;
color:white;
background:#182533;
border-radius:10px;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 10px;
margin-left: 70px;
margin-bottom: 10px;
top: 40px;
left: -10px;
max-width: 320px;
min-width: 70px;
font-family: 'Open Sans', sans-serif;
font-size: 14px;
}
<div class="message">
</div>
Why it still gets max width even if it's empty?