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

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

I have the following html:

Item 1
  • Value 1
4条回答
  •  清酒与你
    2021-02-07 09:26

    I think the proper use of dl, dt and dd is not using ul li's within a dd, but instead use different dd's. It seems to me you are using a list within an element which is itself for listing.

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

    For CSS you could use this:

    DL {
    PADDING: 0; MARGIN: 0; }
    DT {
    POSITION: relative; PADDING: 0; MARGIN: 0; TOP: 1.2em; LEFT: 0px; }
    DD {
    PADDING: 0; MARGIN: 0 0 0 5em; }
    

提交回复
热议问题