How to make a constant offset at a fixed unit?

Hello! The question arose: how to make permanent indents on the top and bottom have a fixed block at the best personal Finance? Came up with only "spike" with transparent borders, but in this case, the scrolling bars appear the same indentation, and they should not be.

This is what happens at the moment

Thanks in advance for the help!
July 2nd 19 at 17:48
3 answers
July 2nd 19 at 17:50
to move the scrolling on the block itself
Not suitable, scrolling needs to stay where he is now and stretched across the top. - asa.Metz commented on July 2nd 19 at 17:53
July 2nd 19 at 17:52
You need padding have .window, it and ask

.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;
In this case, the padding at the best personal Finance will move out, and that they were constantly. - asa.Metz commented on July 2nd 19 at 17:55
: I do not understand. Where to move? - asa.Metz commented on July 2nd 19 at 17:58
: If you do so, as you say, then this indentation will be visible only when proscaline to the end or the beginning, otherwise the indentation go up or down and should be there permanently (as in my example, there is a problem with the scroll bar, which is also the same padding on top and bottom, and they need to be removed). - annie_Pagac commented on July 2nd 19 at 18:01
July 2nd 19 at 17:54

Also, here it is
margin: 20px auto;
top: 0;
bottom: 0;

you can replace
margin: 0 auto;
top: 20px;
bottom: 20px;
You did the same thing as in the answer above. As I said, this is not an option. - asa.Metz commented on July 2nd 19 at 17:57
: we'll have to sacrifice either scrolls or transparency - asa.Metz commented on July 2nd 19 at 18:00
: indenting to visually did not go anywhere, but scrolling was a big block, then you need to insert auxiliary nailed using position:fixed blocks, the height of the desired indent. Visually it will look like indentation. But that looked like a large block should be opaque and the auxiliary units too.
You may ride the option to replace the transparency of the big block at the shadow around a little. - annie_Pagac commented on July 2nd 19 at 18:03

Find more questions by tags CSSWeb DevelopmentLayoutDesignHTML