Answer the question
In order to leave comments, you need to log in
How to permanently indent a fixed block?
Hello! The question arose: how can you make permanent indents from the top and bottom of a fixed block when scrolling? Only a "crutch" with transparent borders came to mind, but in such cases, the scroll bar also has indents, but they should not be.
Here's the output so far codepen.io/anon/pen/gLPoqw
Thanks in advance for your help!
Answer the question
In order to leave comments, you need to log in
You need indents from .window, and set it to
.container {
background: rgba(0, 0, 0, 0.8);
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: auto;
}
.window {
background: #ffffff;
width: 900px;
padding: 10px;
margin: 20px auto;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question