Kiedy definiuję odległość za pomocą top oraz bottom, lub za pomocą marginesów, to sam div mi się przesuwa w górę lub w duł.

/*css*/ html, body { margin: 0 auto; padding: 0px; } #glowna { position: absolute; margin-left: 50%; margin-right: 50%; left: -450px; margin-top: 0px; width: 900px; height: 100%; background-color: red; z-index: 1; } #kreska_lewa { position: absolute; margin-left: 50%; margin-right: 50%; top: 20px; bottom: 20px; left: -451px; width: 10px; min-height: 362px; height: 100%; background-color: green; z-index: 5; } #tresc { position: relative; margin-left: 50px; margin-right: 50px; top: 100px; bottom: 70px; width: 800px; min-height: 300px; background-color: white; z-index: 8; } /*html*/ <div id="glowna"> <div id="tresc"> <p> Treść </p> </div> </div>