CSS:
with spacing/margin between the dt/dd pairs

前端 未结 4 1442
花落未央
花落未央 2021-02-07 09:06

I have the following html:

Item 1
  • Value 1
4条回答
  •  遥遥无期
    2021-02-07 09:38

    Do you mean something like:

    Item 1    Value 1
    
    Item 2    
    
    Item 3    Value 1
              Value 2
              Value 3
    

    Because then I don't see why you can't apply the margin on the dd elements. I did a quick experiment, using the following CSS:

    ul { 
      margin: -1.2em 0 0 100px; 
      padding: 0; 
    }
    
    dd { 
      margin-bottom: 10px;
    }
    

    Which appears to have the effect you need.

提交回复
热议问题