How to space the children of a div with css?

前端 未结 8 692
-上瘾入骨i
-上瘾入骨i 2021-02-03 17:37

I want a gap of say 30px; between all children of my div. E.g if I have:

...

8条回答
  •  渐次进展
    2021-02-03 18:23

    Create a CSS class for them with code:

    .BottomMargin
    {
        margin-bottom:30px;
    }
    

    And assign this class to parent's children using jQuery or manually like this:

    ...

    .......

    the last one may not have one and this is also doable using jQuery.

提交回复
热议问题