Hello. Is there a way to do something like this?

.header and .slider (black bar) are in #container. Padding is registered with #container: 1%, and because of this, all content in it is shifted by 1%.

How to make .slider not shift by 1% (as in the picture)? alt text

  • Maybe where padding add box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; - soledar10
  • > #Container has padding registered: 1%, and because of this, all content in it shifts by 1%. And how should it be? In the picture is not clear anything. - etki
  • @Etki needs to make sure that .slider does not accept this padding. - misc
  • @misc indents are made (margin), not (padding), with the second all content will be pushed into the parent block. - Bastiane

0