Margin on child element moves parent element

前端 未结 14 2182
广开言路
广开言路 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:17

    To prevent "Div parent" use margin of "div child":
    In parent use these css:

    • Float
    • Padding
    • Border
    • Overflow

提交回复
热议问题