Anonymous
Сделайте прокручиваемое Div заполнить оставшееся пространство
Сообщение
Anonymous » 11 июл 2025, 11:18
Я хочу отобразить все продукты на левой стороне веб -сайта. />Setting a height makes the whole thing scrollable, but if I try to fit it to fill the space the scrolling disappears and you can't access the bottom products.
Thank you for helping
Код: Выделить всё
body {
overflow: hidden;
}
h5 {
font-size: 1.2rem;
}
.main-container {
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.left-row {
width: 20%;
border: 1px solid rgba(0, 0, 0, .125);
justify-content: flex-start;
}
.border-top {
height: fit-content;
overflow: scroll;
}
.products {
border: none;
}
.add {
border-top: 1px solid rgba(0, 0, 0, .125);
border-right: 1px solid rgba(0, 0, 0, .125);
width: 20%;
padding: 1rem;
background-color: rgb(242, 242, 242);
}
.card {
margin-bottom: 1rem;
}
.card-body .card-body {
height: 100px;
}
.hover:hover {
cursor: pointer;
}< /code>
@foreach (Product product in Model.products) {
product
}
Add
Подробнее здесь:
https://stackoverflow.com/questions/732 ... ning-space
1752221914
Anonymous
Я хочу отобразить все продукты на левой стороне веб -сайта. />Setting a height makes the whole thing scrollable, but if I try to fit it to fill the space the scrolling disappears and you can't access the bottom products. Thank you for helping [code]body { overflow: hidden; } h5 { font-size: 1.2rem; } .main-container { top: 0; right: 0; bottom: 0; left: 0; } .left-row { width: 20%; border: 1px solid rgba(0, 0, 0, .125); justify-content: flex-start; } .border-top { height: fit-content; overflow: scroll; } .products { border: none; } .add { border-top: 1px solid rgba(0, 0, 0, .125); border-right: 1px solid rgba(0, 0, 0, .125); width: 20%; padding: 1rem; background-color: rgb(242, 242, 242); } .card { margin-bottom: 1rem; } .card-body .card-body { height: 100px; } .hover:hover { cursor: pointer; }< /code> @foreach (Product product in Model.products) { product } Add [/code] Подробнее здесь: [url]https://stackoverflow.com/questions/73260131/make-a-scollable-div-fill-remaining-space[/url]