首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >dd标记内的引导缩进不能按预期工作

dd标记内的引导缩进不能按预期工作
EN

Stack Overflow用户
提问于 2014-11-13 06:37:36
回答 1查看 11.5K关注 0票数 2

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

正如你所看到的,项目4是好的,但是项目4.1应该进一步缩进,并且从该项目开始的任何子项(4.1.1)都应该进一步缩进。

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

代码语言:javascript
复制
.text-indent-4{
    text-indent: 50px;
}

.text-indent-8{
    text-indent: 100px;
}

当它像这样应用时没有区别:

代码语言:javascript
复制
<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>

所以问题是:

1)我如何让<dl>的每个子项缩进2)它们是让它自动计算<dd>的缩进的方法,还是必须指定每个子项?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-11-13 08:43:20

解决这个问题的简单方法是用<ul></ul>标签将子项括起来,这将根据需要缩进子项。

感谢您的编辑

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26898029

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档