Relocation background-image
-
Why is the background image shifting if I add an outside backset to the subsidiary?
<div class="contact__map"> // указываю фоновое изображение <div class="address"></div> // внешний отступ сверху - смещается фон родителя </div>
http://codepen.io/anatolyrodin/pen/NxPYLV?editors=110#0 ♪
-
If I'm not mistaken, properties.
margin-top
In your case, the parent and daughter are "slammed." If you need a detailed answer, why? That's what happens. http://htmlbook.ru/samlayout/blochnaya-verstka/skhlopyvayushchiesya-otstupy ♪
Options for action:
- you can.border: 1px solid transparent
to the parent. And I'm gonna...box-sizing: border-box
so that this does not affect the size of the block so much;
- to give birth.overflow:hidden
;
- to get a daughter.position: relative
andtop: 4rem