How to style dt and dd so they are on the same line?

后端 未结 18 2296
滥情空心
滥情空心 2020-11-27 10:12

Using CSS, how can I style the following:

Mercury
Mercury (0.4 AU from the Sun) is the closest planet to th
18条回答
  •  天涯浪人
    2020-11-27 10:54

    You can use CSS Grid:

    dl {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    Title 1
    Description 1
    Title 2
    Description 2
    Title 3
    Description 3
    Title 4
    Description 4
    Title 5
    Description 5

提交回复
热议问题