dd 标签中的 Bootstrap 缩进没有按预期工作

Dav*_*don 2 html css dd indentation twitter-bootstrap

我正在为一个慈善机构设计(希望我是一名设计师)一个网页 - 章程基本上是我决定在标签中做的标题和信息的列表。但是,我似乎无法让元素按照我希望它们的方式运行,而子项的缩进比它们的父元素更远。

不正确的缩进

如您所见,第 4 项很好,但第 4.1 项应进一步缩进,并且该子项 (4.1.1) 中的任何子项 (4.1.1) 仍应进一步缩进。

我尝试使用 css 并创建两个 text-indent-n 样式,如下所示

.text-indent-4{
    text-indent: 50px;
}

.text-indent-8{
    text-indent: 100px;
}
Run Code Online (Sandbox Code Playgroud)

像这样应用时没有区别:

<dt data-toggle="tooltip" data-placement="top" title="Register of members">Register of members</dt>
  <dd>17. The board must keep a register of members, setting out </dd>
  <dd  class="text-indent-4">17.1   for each current member:</dd>
  <dd  class="text-indent-8">17.1.1 their full name and address; and</dd>
  <dd  class="text-indent-8">17.1.2 the date on which they were registered as a member of the organisation; </dd>
  <dd  class="text-indent-4">17.2   for each former member - for at least six years from the date on he/she ceased to be a member:</dd>
  <dd  class="text-indent-8">17.2.1 his/her name; and</dd>
  <dd  class="text-indent-8">17.2.2 the date on which he/she ceased to be a member. </dd>
  <dd>18    The board must ensure that the register of members is updated within 28 days of any change:</dd>
  <dd  class="text-indent-4">18.1   which arises from a resolution of the board or a resolution passed by the members of the organisation; or </dd>
  <dd  class="text-indent-4">18.2   which is notified to the organisation.  </dd>
  <dd>19    If a member or charity trustee of the organisation requests a copy of the register of members, the board must ensure that a copy is supplied to him/her within 28 days, providing the request is reasonable; if the request is made by a member (rather than a charity trustee), the board may provide a copy which has the addresses blanked out.</dd>
Run Code Online (Sandbox Code Playgroud)

所以问题是:

1) 我怎样才能让 a 的每个子项<dl>缩进 2) 他们是否是一种让它自动计算缩进的方法,<dd>或者每个都必须指定?

Dav*_*don 5

对此的简单补救方法是用<ul></ul>标签包围子项目, 这将根据需要缩进子项目。

感谢您的编辑