Margin on child element moves parent element

前端 未结 14 2119
广开言路
广开言路 2020-11-21 23:38

I have a div (parent) that contains another div (child). Parent is the first element in body with no

14条回答
  •  南笙
    南笙 (楼主)
    2020-11-22 00:23

    I find out that, inside of your .css >if you set the display property of a div element to inline-block it fixes the problem. and margin will work as is expected.

提交回复
热议问题