Код: Выделить всё
div {
border: 1px solid #CCC;
background-color: #FFF;
margin-bottom: 1rem;
padding: 1rem;
width: 8.5in;
max-height: 7in;
}
.static-section {
display: grid;
overflow: hidden;
max-height: 3in;
width: 7.5in;
* {
margin-top: .5rem;
margin-bottom: .5rem;
padding: .5rem;
}
}
textarea {
field-sizing: content;
}< /code>
HEADER
This section is locked at a max 3 inches. I want the background color to be red if the anything makes this section overflow.
When this information starts to go off the screen (i.e., enabling overflow - which the scrollbars are being hidden by the static-section class), I want the background color of this div to change. This will provide a visual indication that the provided response is too long.
FOOTER
Любая помощь с этим очень ценится.
Подробнее здесь: https://stackoverflow.com/questions/795 ... iv-or-form
Мобильная версия