<div class="wrapper1">
<div class="content-splitter">
<div class="left">
<div class="block"> лалалалал</div>
</div>
<div class="right">
<img src="https://img4.goodfon.ru/wallpaper/nbig/1/7c/kartinka-loshadi-liubov-serdechki.jpg" alt="">
</div>
</div>
</div>
.wrapper1 {
display: grid;
grid-template-columns: 2fr 1fr;
width: 1500px;
height: 300px;
box-shadow: 1px 1px 25px 3px rgba(0, 0, 0, .3);
}
.content-splitter {
display: flex;
gap: 0em;
}
.left {
display: flex;
flex-direction: column;
gap: 4em;
padding: 90px 60px;
width: minmax(80px, 80%);
font-size: 1.4em;
line-height: 28px;
}
.block {
display: flex;
flex-direction: column;
gap: .75em;
}
.right {
overflow: auto;
object-fit: contain;
}
let btns = document.querySelectorAll('.modal-open');
let modal = document.querySelectorAll('.modal');
const body = document.body
function open(el) {
el.classList.add('active');
}
function close(el) {
el.target.closest('.modal').classList.remove('active')
}
btns.forEach(btn => {
btn.addEventListener('click', (e) => {
let data = e.target.dataset.open;
modal.forEach(modals => {
if(modals.dataset.modal == data || modals.dataset.modal == e.target.closest('modal-open').dataset.open) {
open(modals)
}
})
} )
modal.forEach(modals => {
modals.addEventListener('click', e => close(e))
})
})
body {position: fixed;}
window.addEventListener("scroll", event => {
event.preventDefault();
window.scrollTo(0, 0);
});
div {
max-height: 20rem;
overflow-x: hidden;
overflow-y: auto;
margin-right: 0.25rem;
::-webkit-scrollbar-track {
border-radius: 0.125rem;
background-color: lightgray;
}
::-webkit-scrollbar {
width: 0.25rem;
border-radius: 0.125rem;
}
::-webkit-scrollbar-thumb {
border-radius: 0.125rem;
background-color: gray;};
}
}